Minimum_should_match ignored when match only produces 1 term?

"match": {
  "product.name.full": {
    "query": "chicken",
    "minimum_should_match": 3
  }
}

will always match,
but if I provide it with input that can produce >2 terms like this:

"match": {
  "product.name.full": {
    "query": "chicken wings",
    "minimum_should_match": 3
  }
}

it respects the minimum_should_match.

Why is it this way?
And how do I ensure that a query must contains at least 3 terms when the user only input one?

Hi @Altiano_Gerung , I doubt there's any way to do it from the query side, unless we have any parameters that supports this functionality in future. As of now, the workaround could be-
Writing a code in the painless script and attaching that to the ingest pipeline, which will dictate the field according to your requirements of the number of terms needed.

Some advanced topics right there,

Could you point me for an example please?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.