June 2017
Beginner to intermediate
404 pages
8h 22m
English
In the relational database world, we would use the and/or clauses to combine different conditions. In Elasticsearch, we would use the bool query to achieve the same. Bool query is very powerful; a bool query can have other bool queries. When combining different queries, if matching one query is more important than the other, bool query supports boosting individual queries. We will discuss more in the How to boost score based on queries section. The basic structure of bool query is shown here:
{ "query": { "bool": { "must": [], "must_not": [], "should": [], "filter": [] } } }
The must section of the bool query contains all the must-match queries. The must_not section will contain all the not queries. The should ...
Read now
Unlock full access