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

hi,

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

URL:
https://elastic:password@MACHINENAME:9500/indexname/_search
query post body:
  {
"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.

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

hi Mark,

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

@warkolm

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

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

@warkolm

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

BM25 is a more modern scoring algorithm.

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