Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Exists API: Allow user to find if any document exists for a given query #6995
The idea behind the new API is to enable fast exists functionality for documents, given a query. It would be very similar to the existing count API.
This API will be faster then using the Count API (setting terminate_after=1) in the general case, as it would return the response after the first shard reports existing documents, instead of blocking for responses from all the shards. In the worst case, if no documents actually exists, it would be as performant as using the Count API with terminate_after=1.
(Check corresponding PR for req/response)
related to #6876