-
Notifications
You must be signed in to change notification settings - Fork 624
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
IndicesPutAliasRequest with empty Index argument creates an index rather than failing to create an alias #201
Comments
I did a little bit of snooping around, and it seems like the I'm no longer maintaining the library, so hopefully somebody can have a look into a fix. My hunch is that this is gonna be tricky on the transport level, since it just depends on the Go standard library. Unfortunately, |
That is really interesting. Thanks for the quick response and go-playground example. |
@Anaethelion tagging you as you seem to be an active contributor to the project - have you any idea if the input validation that @karmi spoke of was added to later versions? We are experiencing this error updating from |
I've been digging on this, and what happens is as follows :
The problem is in this method, I'll see what I can do without breaking the API! |
@Anaethelion I came to the same solution, thanks for looking into it! |
PUT method requires the index name, as you can see at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-add-alias.html. What about using this one https://github.com/elastic/go-elasticsearch/blob/main/esapi/api.indices.update_aliases.go ? |
If I do the following in my code:
I expect to receive a 400 and the following error payload:
Instead I get a 200 for a create index.
Looking at the code in the
Do
method of theIndicesPutAliasRequest
I don't understand how this is possible. What am I missing that would cause this create index fallback?The text was updated successfully, but these errors were encountered: