Hi,
In order to decide, if any search result exists for a given query, you can do this in ES efficiently using 'size=0&terminate_after=1',
see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#_fast_check_for_any_matching_docs
Is there an equivalent for the terminate_after param in solr/lucene? -- Martin
smime.p7s
Description: S/MIME Cryptographic Signature