Minimum should match

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/_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, as 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.33.158