# What's the sort default score difference between elasticsearch7.9.3 and elasticsearch6.8.0

**URL:** <https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711>\
**Category:** Elasticsearch\
**Created:** [June 2, 2021, 8:03am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711 "2021-06-02T08:03:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunweiconfidence](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@sunweiconfidence](https://discuss.elastic.co/u/sunweiconfidence)\
**Post date:** [June 2, 2021, 8:03am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/1 "2021-06-02T08:03:56Z")

</div>

hi,

```
i test in the elasticsearch7.9.3 using below query clause:

URL:
https://elastic:password@MACHINENAME:9500/indexname/_search
query post body:

```

```auto
  {
"explain": true,
"from": 0,
"size": 130,
"query": {
    "bool": {
        "should": {
            "bool": {
                "should": [
                    {
                        "match_phrase_prefix": {
                            "TitleFieldAC": {
                                "query": "test",
                                "boost": 200
                            }
                        }
                    },
                    {
                        "match_phrase_prefix": {
                            "SummaryFieldAC": {
                                "query": "test",
                                "boost": 100
                            }
                        }
                    },
                    {
                        "multi_match": {
                            "query": "test",
                            "type": "cross_fields",
                            "operator": "or",
                            "auto_generate_synonyms_phrase_query": false,
                            "boost": 1
                        }
                    }
                ]
            }
        },
        "minimum_should_match": "1"
    }
},
"sort": [
    {
        "_score": "desc"
    }
]
}

```

```
but i found that in elasticsearch6.8.0, sort result is not same as elasticsearch7.9.3's sort result using same query clause,

i want to know, whether the two elasticsearch versions sort by score is different or my usage have issue? thanks.
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 2, 2021, 9:54am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/2 "2021-06-02T09:54:02Z")

</div>

Can you please edit your post and remove the formatting from the plain text, it's very difficult to read your question.

---

<div class="post-metadata">

**Author:** ![sunweiconfidence](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@sunweiconfidence](https://discuss.elastic.co/u/sunweiconfidence)\
**Post date:** [June 3, 2021, 1:10am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/3 "2021-06-03T01:10:43Z")

</div>

hi Mark,

please see my latest message, i have formatted the code above, thanks.

---

<div class="post-metadata">

**Author:** ![sunweiconfidence](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@sunweiconfidence](https://discuss.elastic.co/u/sunweiconfidence)\
**Post date:** [June 8, 2021, 6:05am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/4 "2021-06-08T06:05:38Z")

</div>

@warkolm

do you have any suggestion for the score sort issue? thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 8, 2021, 6:07am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/5 "2021-06-08T06:07:10Z")

</div>

We did switch from TFIDF to BM25 between 6\>7, so that might be impact things. But I don't know enough detail on that area to be able to provide you a definitive answer sorry

---

<div class="post-metadata">

**Author:** ![sunweiconfidence](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@sunweiconfidence](https://discuss.elastic.co/u/sunweiconfidence)\
**Post date:** [June 10, 2021, 6:35am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/6 "2021-06-10T06:35:21Z")

</div>

@warkolm

Why need to change from TFIDf to BM25 from 6.x to 7.x version? i don't particularly understand, thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 10, 2021, 6:42am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/7 "2021-06-10T06:42:30Z")

</div>

BM25 is a more modern scoring algorithm.

---

<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:** [July 8, 2021, 6:42am UTC](https://discuss.elastic.co/t/whats-the-sort-default-score-difference-between-elasticsearch7-9-3-and-elasticsearch6-8-0/274711/8 "2021-07-08T06:42:35Z")

</div>

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