Filter context
Last updated
Was this helpful?
Last updated
Was this helpful?
Filter context is in effect whenever a query clause is passed to a filter
parameter, such as the filter
or must_not
parameters in the query, the filter
parameter in the query, or the aggregation.
In filter context, a query clause answers the question “Does this document match this query clause?” The answer is a simple Yes or No — no scores are calculated. Filter context is mostly used for filtering structured data, e.g.
Does this timestamp
fall into the range 2015 to 2016?
Is the status
field set to "published"
?
Frequently used filters will be cached automatically by Elasticsearch, to speed up performance.