I'm trying to understand exactly how Elasticsearch queries work, but I'm having a tough time with the concept of filters and exact values.
using filter within a query is boolean in the sense that it doesn't contain a score and will completely eliminate any results that don't fit the filter conditions, right?
must within a bool is different from filter because it will still return results which don't match the conditions, and will include a score? doesn't that make it not a boolean?
what is the purpose of wrapping filter in bool if the values are always boolean anyway?
do aggregations include results that are filtered?
filter clauses are exactly like must just they don't imply any scoring at all
In filter, you will usually shove exact queries (so called term-level queries), i.e. term queries or match queries on keyword fields, range queries, etc
In must, you will usually shove full text queries, i.e. match and match_phrase queries, query_string queries, etc
Nothing prevents you to have full-text queries in filter and term-level queries in must, but that makes less sense.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.