-
Notifications
You must be signed in to change notification settings - Fork 25.2k
search_exists should be consistent with other *_exists methods #11204
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
Comments
Any reason not to have a HEAD request for a SEARCH default to search_exists? Maybe its just too weird do a HEAD with a body. By the client API do you mean the Java api? All of them? |
Unfortunately we cannot rely on I mean all of them, they should be consistent in this, but those will be updated once the java client is and the yaml test suite is changed to reflect that. |
Search exists api is different compared to search. Search (as well as count) does allow you to set Supporting HEAD for consistency sounds good but this api is different compared to other exists* api, as it has to accept a body (which can be provided as query_string encoded |
@honzakral I didn't notice at first your point around supporting |
yeah lets do it - I think this is relatively simple to add. We have For the response part I think we can just omit the response if we |
I know @markharwood mentioned that @ESamir was looking for a low hanging fruit, this one could be one? |
Registers the `_search/exists` api to receive HEAD requests. If it gets one then it won't output the JSON response but will still do everything else. Adds magic to the rest tests to ignore `catch: missing` for HEAD requests. This behavior is checked instead with `- is_false: anystring`. This setup makes the rest tests for `search/_exists` work for HEAD requests. Also forces the request body over the source URL parameter for all HEAD requests. Closes elastic#11204
I marked this back for discussion. The search/exists api has been removed from master and deprecated in 2.1. We can now discuss whether we want |
If it is going to be part of the Elasticearch API, then it needs to be part of the REST tests, which means that all clients should be able to support it. This makes me lean towards: if you want to add a shortcut to a particular client then go for it, but it shouldn't be part of the official API. |
Search exists has been removed. Closing |
HEAD
request type (which also means to allow forPOST
when http client cannot sendHEAD
with body, as well as thesource
parameter)true
/false
The text was updated successfully, but these errors were encountered: