December 2017
Intermediate to advanced
434 pages
10h 29m
English
Instead of applying the and operator, we can keep the or operator and specify at least how many terms should match in a given document for it to be included in the result. This allows for finer grained control:
GET /amazon_products/products/_search{ "query": { "match": { "manufacturer": { "query": "victory multimedia", "minimum_should_match": 2 } } }}
The preceding query behaves in a similar way to the and operator, as there are two terms in the query and we have specified that, at the minimum, two terms should match.
With minimum_should_match, we can specify something similar to at least three of the terms matching in the document.
Read now
Unlock full access