# Sorting requirements

**URL:** <https://discuss.elastic.co/t/sorting-requirements/6607>\
**Category:** Elasticsearch\
**Created:** [February 6, 2012, 5:38pm UTC](https://discuss.elastic.co/t/sorting-requirements/6607 "2012-02-06T17:38:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wes\_Plunk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wes_plunk/32/2446_2.png) [@Wes\_Plunk](https://discuss.elastic.co/u/Wes_Plunk)\
**Post date:** [February 6, 2012, 5:38pm UTC](https://discuss.elastic.co/t/sorting-requirements/6607/1 "2012-02-06T17:38:11Z")

</div>

What's required on a field to make it sortable?

What's optional on a field when you want it sortable that might affect  
how sorting works?

---

<div class="post-metadata">

**Author:** ![louis\_gueye](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/louis_gueye/32/2772_2.png) [@louis\_gueye](https://discuss.elastic.co/u/louis_gueye)\
**Post date:** [February 7, 2012, 8:51am UTC](https://discuss.elastic.co/t/sorting-requirements/6607/2 "2012-02-07T08:51:50Z")

</div>

Every\* non analyzed\* type/field is _sortable_. Object comparison is used I  
guess (date, long, string, int etc)  
Every _analyzed_ field can be sorted by _\_score_ because it's non sense to  
sort an analyzed field : it has been split into tokens during analysis.  
If you absolutly need an analyzed field to be sorted you can use \*  
multi-field\*. It will store both analysed and non analysed representations  
of the field. You'll then be able to sort by the non  
analyzed representation.

Good luck,

--  
Cordialement/Regards,

Louis GUEYE  
linkedin [http://fr.linkedin.com/in/louisgueye](http://fr.linkedin.com/in/louisgueye) |  
blog[http://deepintojee.wordpress.com/](http://deepintojee.wordpress.com/)  
| twitter [http://twitter.com/#!/lgueye](http://twitter.com/#%21/lgueye)

2012/2/6 Wes Plunk [wes@wesandemily.com](mailto:wes@wesandemily.com)

> What's required on a field to make it sortable?
> 
> What's optional on a field when you want it sortable that might affect  
> how sorting works?

---

<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:40am UTC](https://discuss.elastic.co/t/sorting-requirements/6607/3 "2017-07-06T03:40:23Z")

</div>


