-
Book Overview & Buying
-
Table Of Contents
ElasticSearch Cookbook
By :
Every person using a search engine must have sometimes used the syntax with minus (-) and plus (+) to include or exclude some query terms. The Boolean query/filter allows programmatically defining some queries to include or exclude or optionally include (should) in the query.
This kind of query/filter is one of the most important ones, because it allows to aggregate a lot of simple queries/filters that we will see in this chapter to build a big complex one.
You need a working ElasticSearch cluster and an index populated with the script available in online code.
For executing a Boolean query/filter, we need to perform the following steps:
We execute a Boolean query, from command line as follows:
curl -XPOST 'http://127.0.0.1:9200/test-index/test-type/_search' -d '{
"query": {
"bool" : {
"must" : {
"term" : { "parsedtext" : "joe" }
},
"must_not" : {
"range" : {
"position...
Change the font size
Change margin width
Change background colour