-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Remove search-exists API #13682
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
I'm certainly fine with it. I've never used it in production. |
+1 |
Will we also wire HEAD _search to do the same and add terminate_after?
|
@bleskes no - some clients don't support HEAD with body. I don't see the need for sugar here |
I don’t follow the logic? if you do submit a head a request, why not make sure return as fast as possible with the information needed (this is something there).
|
Also do we add/leave this functionality in the client as a shortcut? There is a precedent to it with the |
@bleskes first, i have never heard of anybody using this feature, and can't come up with a real use case for it anyway. Second, not all clients can support it. Third, it is easy to replicate the functionality by just setting @honzakral I would say we don't bother supporting it in the client as the feature is really not useful. |
I was asked about it a while ago. Not sure if the use case at the time. The one I can think of out of the top of my had is wanting to validate that a search link will actually lead to results - for example a "did you mean" recommendation link (which may come from the completion suggester or another system).
Those that do can, and those don't can't. Just like GET with a body imho. As you say, it's not in your way if you can't. All I wanted is to make sure this gets some attention. It's super easy to implement on the ES side (and we don't now) and to me is what I would expect from a HEAD _search request. If you rather not do but wait for an, eventual, feature request - it's good with me. |
Another good reason for removing search-exists: #13094 |
I am looking into this. I think we may want to make |
I think it has been made experimental because it was initially used by suggesters. But then we deprecated the limit filter in favour of it and now we are thinking of doing the same for the search/exists API, so it probably makes sense to remove the experimental flag. |
@clintongormley do you have any data why you are saying it's not useful? People are using it and asking questions around it. Due to it's inconsistencies (#11204) more than about any other API. |
@honzakral i don't have data, just instinct (which may well be wrong). However, this is a really simple function that can be entirely replaced by the search API, which is much more thoroughly tested (and much more widely used). My goal here is to reduce the surface area of these APIs to make the code base easier to maintain and test. You're free to add a convenience method to the python API if you feel strongly about it. |
… terminate_after 1 Relates to elastic#13682
… terminate_after 1 Relates to #13682
Closes elastic#13682 Closes elastic#13911
The search-exists API tells you if there are any matching results, without performing a count. Besides this being an almost-never-useful operation, it could easily be replicated with:
I propose removing this API.
The text was updated successfully, but these errors were encountered: