# Sorting on strings and the "missing" property

**URL:** <https://discuss.elastic.co/t/sorting-on-strings-and-the-missing-property/5883>\
**Category:** Elasticsearch\
**Created:** [November 16, 2011, 4:30am UTC](https://discuss.elastic.co/t/sorting-on-strings-and-the-missing-property/5883 "2011-11-16T04:30:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Hoffman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick_hoffman/32/1872_2.png) [@Nick\_Hoffman](https://discuss.elastic.co/u/Nick_Hoffman)\
**Post date:** [November 16, 2011, 4:30am UTC](https://discuss.elastic.co/t/sorting-on-strings-and-the-missing-property/5883/1 "2011-11-16T04:30:33Z")

</div>

Hey guys. If the "missing" option is provided in a string-sort, why does ES  
generate an error instead of simply ignoring the option?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 16, 2011, 2:21pm UTC](https://discuss.elastic.co/t/sorting-on-strings-and-the-missing-property/5883/2 "2011-11-16T14:21:14Z")

</div>

missing is not supported for String values (currently), only for numeric  
values. Can you gist the error you get?

On Wed, Nov 16, 2011 at 6:30 AM, Nick Hoffman [nick@deadorange.com](mailto:nick@deadorange.com) wrote:

> Hey guys. If the "missing" option is provided in a string-sort, why does  
> ES generate an error instead of simply ignoring the option?

---

<div class="post-metadata">

**Author:** ![Nick\_Hoffman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick_hoffman/32/1872_2.png) [@Nick\_Hoffman](https://discuss.elastic.co/u/Nick_Hoffman)\
**Post date:** [November 16, 2011, 8:21pm UTC](https://discuss.elastic.co/t/sorting-on-strings-and-the-missing-property/5883/3 "2011-11-16T20:21:07Z")

</div>

Sure thing, mate. Here it is:

> <https://gist.github.com/nickhoffman/1371224>

---

<div class="post-metadata">

**Author:** ![Nick\_Hoffman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick_hoffman/32/1872_2.png) [@Nick\_Hoffman](https://discuss.elastic.co/u/Nick_Hoffman)\
**Post date:** [January 30, 2012, 3:56am UTC](https://discuss.elastic.co/t/sorting-on-strings-and-the-missing-property/5883/4 "2012-01-30T03:56:37Z")

</div>

On Wednesday, 16 November 2011 09:21:14 UTC-5, kimchy wrote:

> missing is not supported for String values (currently), only for numeric  
> values. Can you gist the error you get?

So if I want the documents with a null value for the sort-field to be at  
the end of the results, must that be done after retrieving the results from  
ES?

---

<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 6, 2017, 3:41am UTC](https://discuss.elastic.co/t/sorting-on-strings-and-the-missing-property/5883/5 "2017-07-06T03:41:04Z")

</div>


