Show just one document on exact match

Hello,
I want to ask if it is possible to show just top results with score bigger than x(some integer value).
For example:
Query:

{
  "query": {
    "bool": {
      "should": [
        {
          "multi_match": {
            "query": "123456",
            "type": "phrase",
            "fields": ["product_no"]
          }
        },
        {
          "multi_match": {
            "query": "123456",
            "type": "phrase_prefix",
            "boost": 2000,
            "fields": ["product_no"]
          }
        }
      ]
    }
  }
}

Let's say that I have two documents with following product_no = ['123456', '123456789'].
Query will return both documents because document with product_no = '123456789' also have some score. I am able to use min_score but setting it can throw away good results in normal case.

Is it possible somehow show just one document when it is exact match ? Maybe some max threshold ?

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