-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Elasticsearch Server: Second Edition

One of the filters available in Elasticsearch that is very simple at first glance is the terms
filter. In its simplest form, it allows you to filter documents to only those that match one of the given terms and is not analyzed. An example use of the terms
filter is as follows:
{ "query" : { "constant_score" : { "filter" : { "terms" : { "title" : [ "crime", "punishment" ] } } } } }
The preceding query would result in documents that match the crime
or punishment
terms in the title
field. The way the terms
filter works is that it iterates over the provided terms and finds the documents that match these terms. Of course, the matched document identifiers are loaded into a structure called bitset and are cached. Sometimes, we may want to alter the default behavior. We can do this by providing the execution
parameter with one of the following values:
plain
: This is the default method that iterates over all the terms provided, storing...
Change the font size
Change margin width
Change background colour