# How to do case insensitive sort in ES 5.1+?

**URL:** https://discuss.elastic.co/t/how-to-do-case-insensitive-sort-in-es-5-1/69481
**Category:** Elasticsearch
**Created:** [December 19, 2016, 5:38pm UTC](https://discuss.elastic.co/t/how-to-do-case-insensitive-sort-in-es-5-1/69481 "2016-12-19T17:38:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tlovett1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tlovett1/32/13950_2.png) [@tlovett1](https://discuss.elastic.co/u/tlovett1)
#### Post date: [December 19, 2016, 5:38pm UTC](https://discuss.elastic.co/t/how-to-do-case-insensitive-sort-in-es-5-1/69481/1 "2016-12-19T17:38:15Z")

</div>

Hello, previously I used a text field with lowercase analyzer. This is no longer possible apparently as I get a field data warning. What is the best way to achieve this?

Thanks!

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [December 20, 2016, 10:42am UTC](https://discuss.elastic.co/t/how-to-do-case-insensitive-sort-in-es-5-1/69481/2 "2016-12-20T10:42:23Z")

</div>

Right now there is no way to do this. We are looking into ways to apply simple filters to keywords. For instance if you were able to lowercase all values, then sorting would be case-insensitive. [https://github.com/elastic/elasticsearch/issues/18064](https://github.com/elastic/elasticsearch/issues/18064)

---

<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: [January 17, 2017, 10:42am UTC](https://discuss.elastic.co/t/how-to-do-case-insensitive-sort-in-es-5-1/69481/3 "2017-01-17T10:42:31Z")

</div>

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