# Sort value

**URL:** <https://discuss.elastic.co/t/sort-value/92773>\
**Category:** Elasticsearch\
**Created:** [July 12, 2017, 7:50am UTC](https://discuss.elastic.co/t/sort-value/92773 "2017-07-12T07:50:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 12, 2017, 8:06am UTC](https://discuss.elastic.co/t/sort-value/92773/2 "2017-07-12T08:06:43Z")

</div>

Follow some advices available at [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and provide a full script so we can understand what exactly your problem is.

I suspect you are using an old elasticsearch version and doing sorting on a `string` field. But I can't tell more without details.

Anyway, in 5.x you should use a `keyword` field type to do the sorting on.

---

_[View the full topic](https://discuss.elastic.co/t/sort-value/92773)._
