How can I limit the query to be executed (I mean the size) If the size is ,more size for example 10M than automatically the query has to be withdrawn/throw message
Not clear on the requirement
"Size" could mean:
- The number of documents in the index
- The number of documents that match the query
- The number of documents returned in the top-matching
hits
- The number of documents analyzed in
aggregations
- The number of terms in an aggregation e.g. top N authors.
What problem are you trying to avoid? Long-running queries? Irrelevant results? Memory issues?
Hi
To avoid Memory issues
Regards
Justin
Look at From / Size | Elasticsearch Guide [2.1] | Elastic
Note that from + size can not be more than the index.max_result_window index setting which defaults to 10,000.