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

**URL:** <https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657>\
**Category:** Elasticsearch\
**Created:** [February 10, 2017, 1:47pm UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657 "2017-02-10T13:47:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roeland](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Roeland](https://discuss.elastic.co/u/Roeland)\
**Post date:** [February 10, 2017, 1:47pm UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/1 "2017-02-10T13:47:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [February 10, 2017, 2:51pm UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/2 "2017-02-10T14:51:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Roeland](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Roeland](https://discuss.elastic.co/u/Roeland)\
**Post date:** [February 10, 2017, 3:49pm UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/3 "2017-02-10T15:49:29Z")

</div>

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?

---

<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:** [February 10, 2017, 10:40pm UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/4 "2017-02-10T22:40:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Roeland](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Roeland](https://discuss.elastic.co/u/Roeland)\
**Post date:** [February 13, 2017, 7:57am UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/5 "2017-02-13T07:57:48Z")

</div>

What is a GH? (Feeling dumb now)

---

<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:** [February 13, 2017, 8:16am UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/6 "2017-02-13T08:16:50Z")

</div>

Github.

---

<div class="post-metadata">

**Author:** ![Roeland](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Roeland](https://discuss.elastic.co/u/Roeland)\
**Post date:** [February 13, 2017, 8:31am UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/7 "2017-02-13T08:31:03Z")

</div>

[Github issue created #23139](https://github.com/elastic/elasticsearch/issues/23139)

Thx

---

<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:** [March 13, 2017, 8:31am UTC](https://discuss.elastic.co/t/breaking-change-in-sort-field-missing-is-gone-from--score/74657/8 "2017-03-13T08:31:19Z")

</div>

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