-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create key: Add ability to specify the Uid
and Name
value
#342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dbolkensteyn,
Thanks for your PR. Indeed, the key is not specified because convertKeyToParsedKey()
is called only by the CreateKey()
method, and no matter what key is passed to that method, it will create a new key. So yes it will always return a random new key.
Oh right, That's a bummer since it makes it impossible to create a predictable search key. |
Hey @alallema, could you please review this once more? They This PR now sends both |
Hi @dbolkensteyn , |
Uid
and Name
value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @dbolkensteyn for this PR and for contributing to Meilisearch
❤️
Good catch and at the same time you fix the fact that the Name
of the Key wasn't created 🔥
LGTM!
bors merge |
Awesome thank you so much @alallema |
type Key struct {}
andtype KeyParsed struct {}
both have aKey string
field.However,
KeyParsed
's one is never filled and thus the server always will generate a random key, even if a value was specified in the call toclient.CreateKey(&meilisearch.Key{Key: "..."}}
.