# Min\_score not working as expected

**URL:** <https://discuss.elastic.co/t/min-score-not-working-as-expected/342970>\
**Category:** Elasticsearch\
**Tags:** eql-elastic-query-language\
**Created:** [September 13, 2023, 3:06pm UTC](https://discuss.elastic.co/t/min-score-not-working-as-expected/342970 "2023-09-13T15:06:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayush\_Mehta\_Engineer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ayush_mehta_engineer/32/125623_2.png) [@Ayush\_Mehta\_Engineer](https://discuss.elastic.co/u/Ayush_Mehta_Engineer)\
**Post date:** [September 13, 2023, 3:06pm UTC](https://discuss.elastic.co/t/min-score-not-working-as-expected/342970/1 "2023-09-13T15:06:37Z")

</div>

I am trying to fetch the results with a minimum score of 1 using min\_score using the following query but I am still getting responses with null score  
I know that my query is bit complex and there could be better ways to implement it, I am new to elasticsearch and still learning. Can anyone help me out with this

```auto
        {
          "constant_score": {
            "filter": {
              "bool": {
                "should": [
                  {
                    "multi_match": {
                      "query": "bone doctor",
                      "fields": [
                        "dcName",
                        "dcCity",
                        "dcLocation",
                        "doctorName",
                        "doctorQualification",
                        "doctorSpecialization",
                        "packageName",
                        "packageFilters"
                      ],
                      "type": "cross_fields",
                      "operator": "and"
                    }
                  }
                ]
              }
            },
            "boost": 1
          }
        },
        {
          "constant_score": {
            "filter": {
              "bool": {
                "should": [
                  {
                    "multi_match": {
                      "query": "bone",
                      "fields": [
                        "dcName",
                        "dcCity",
                        "dcLocation",
                        "doctorName",
                        "doctorQualification",
                        "doctorSpecialization",
                        "packageName",
                        "packageFilters"
                      ],
                      "type": "phrase"
                    }
                  }
                ]
              }
            },
            "boost": 1
          }
        },
        {
          "constant_score": {
            "filter": {
              "bool": {
                "should": [
                  {
                    "multi_match": {
                      "query": "doctor",
                      "fields": [
                        "dcName",
                        "dcCity",
                        "dcLocation",
                        "doctorName",
                        "doctorQualification",
                        "doctorSpecialization",
                        "packageName",
                        "packageFilters"
                      ],
                      "type": "phrase"
                    }
                  }
                ]
              }
            },
            "boost": 1
          }
        },
        {
          "constant_score": {
            "filter": {
              "bool": {
                "should": [
                  {
                    "multi_match": {
                      "query": "bone",
                      "fields": [
                        "dcName",
                        "dcCity",
                        "dcLocation",
                        "doctorName",
                        "doctorQualification",
                        "doctorSpecialization",
                        "packageName",
                        "packageFilters"
                      ],
                      "type": "phrase_prefix"
                    }
                  }
                ]
              }
            },
            "boost": 3
          }
        },
        {
          "constant_score": {
            "filter": {
              "bool": {
                "should": [
                  {
                    "multi_match": {
                      "query": "doctor",
                      "fields": [
                        "dcName",
                        "dcCity",
                        "dcLocation",
                        "doctorName",
                        "doctorQualification",
                        "doctorSpecialization",
                        "packageName",
                        "packageFilters"
                      ],
                      "type": "phrase_prefix"
                    }
                  }
                ]
              }
            },
            "boost": 3
          }
        },
        {
          "constant_score": {
            "filter": {
              "bool": {
                "should": [
                  {
                    "multi_match": {
                      "query": "bone",
                      "fields": [
                        "dcName",
                        "dcCity",
                        "dcLocation",
                        "doctorName",
                        "doctorQualification",
                        "doctorSpecialization",
                        "packageName",
                        "packageFilters"
                      ],
                      "type": "most_fields",
                      "fuzziness": "auto"
                    }
                  }
                ]
              }
            },
            "boost": 1
          }
        },
        {
          "constant_score": {
            "filter": {
              "bool": {
                "should": [
                  {
                    "multi_match": {
                      "query": "doctor",
                      "fields": [
                        "dcName",
                        "dcCity",
                        "dcLocation",
                        "doctorName",
                        "doctorQualification",
                        "doctorSpecialization",
                        "packageName",
                        "packageFilters"
                      ],
                      "type": "most_fields",
                      "fuzziness": "auto"
                    }
                  }
                ]
              }
            },
            "boost": 1
          }
        }
      ]
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 12, 2023, 6:08am UTC](https://discuss.elastic.co/t/min-score-not-working-as-expected/342970/3 "2023-10-12T06:08:51Z")

</div>

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