Operator

By default, if the search term specified results in multiple terms after applying the analyzer, we need a way to combine the results from individual terms. As we saw in the preceding example, the default behavior of the match query is to combine the results using the or operator, that is, one of the terms has to be present in the document's field.

This can be changed to use the and operator using the following query:

GET /amazon_products/_search
{
"query": {
"match": {
"manufacturer": {
"query": "victory multimedia",
"operator": "and"
}
}
}
}

In this case, both the terms victory and multimedia should be present in the document's manufacturer field.

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

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