Filtered Vs filter
Last updated
Was this helpful?
Last updated
Was this helpful?
(Old 1.x Syntax) queries have been deprecated in favor of
Mastering Elasticsearch 5.x
with the release of Lucene 5.0, which is used by
Elasticsearch version 2.0.0, both queries and filters became the same
internal object, taking care of both document relevance and matching.
So, an Elasticsearch query that used to look like the following
{"
filtered" : {
"query": { query definition },
"filter": { filter definition }
}
}
It should now be written like this in version 2.x:
{"
bool" : {
"must": { query definition },
"filter": { filter definition }
}}