-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Deprecate _search/exists in favour of regular _search with size 0 and terminate_after 1 #13910
Conversation
Nice. Perhaps add a section to the search API docs entitled "Fast check for any matching docs" or similar? |
+1 on documenting this "recipe" |
+1 maybe @debadair can help documenting that? |
I pushed a new commit to log a deprecation warning when search exists is used. Agreed on the additional documentation needed, I would open a follow-up PR though as that one would need to go to master too. Is that ok? |
LGTM |
@@ -634,16 +634,19 @@ public CountRequestBuilder prepareCount(String... indices) { | |||
|
|||
@Override | |||
public ActionFuture<ExistsResponse> exists(final ExistsRequest request) { | |||
deprecationLogger.deprecated("search exists api is deprecated and will be removed in the next major version, use search with size set 0 and terminate_after set to 1 instead"); |
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.
s/set 0/set to 0/ ?
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.
good catch
… terminate_after 1 Relates to elastic#13682
2896974
to
e7e09e2
Compare
Relates to elastic#13910 Closes elastic#14393
Deprecate
_search/exists
in favour of regular_search
withsize
set to0
andterminate_after
set to1
.Relates to #13682