Breaking change in sort: field "missing" is gone from "_score"

(Roeland Van Heddegem) #1

Up until ES2.x I used the following code for sorting:

  ,"sort": [{
    "_score": {
     "order": "desc",
     "missing": "_last"

Now, we want to go to ES5.2 and see that this sentence don't work anymore, because the field "missing" is gone:
errormessage: "reason": "[_score] unknown field [missing], parser not found"

Is this intended? We are not using anything with geo_....
I looked through the breaking changes, but could not find anything mentioning this change.

(Jörg Prante) #2

If you use _score for sorting, missing values are not expected.

(Roeland Van Heddegem) #3

This is not documented and was tolerated in ES2.x. I did not expect this error to happen, and searching for it returned no results.
I agree that this is indeed weird and I'll update my code, no problem.
But this should be documented in the breaking changes IMHO.

By the way, have you an idea in which version this was implemented?

(Mark Walkom) #4

Please do raise an GH issue for this so we can add it :slight_smile:

(Roeland Van Heddegem) #5

What is a GH? (Feeling dumb now)

(Mark Walkom) #6


(Roeland Van Heddegem) #7

Github issue created #23139


(system) #8

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