# Case insensitive sort on a field using App Search

**URL:** <https://discuss.elastic.co/t/case-insensitive-sort-on-a-field-using-app-search/252990>\
**Category:** Elastic Search\
**Created:** [October 22, 2020, 11:26am UTC](https://discuss.elastic.co/t/case-insensitive-sort-on-a-field-using-app-search/252990 "2020-10-22T11:26:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grantgochnauer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grantgochnauer/32/2300_2.png) [@grantgochnauer](https://discuss.elastic.co/u/grantgochnauer)\
**Post date:** [October 22, 2020, 11:26am UTC](https://discuss.elastic.co/t/case-insensitive-sort-on-a-field-using-app-search/252990/1 "2020-10-22T11:26:26Z")

</div>

We're using Elastic Enterprise App Search and want to be able to sort on field names without case sensitivity. It seems that the only way to to this is to bypass the App search APIs and hit the underlying Elastic cluster however this is not ideal because throughout our entire integration with Elastic, nowhere are we hitting Elastic directly and that significantly increases the complexity of our integration instead of simply being able to sort on a field without case sensitivity.

Does anyone have any ideas on the best way to accomplish this?

The other idea we had was to index the field with all lowercase but this is not ideal either because we want the data in our fields to reflect the actual values as they exist in the database (for displaying them to the user for example).

Thank you in advance,  
Grant

---

<div class="post-metadata">

**Author:** ![DanielaSanchezA](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@DanielaSanchezA](https://discuss.elastic.co/u/DanielaSanchezA)\
**Post date:** [January 25, 2022, 3:36pm UTC](https://discuss.elastic.co/t/case-insensitive-sort-on-a-field-using-app-search/252990/2 "2022-01-25T15:36:43Z")

</div>

I have the same issue any answer?

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [February 1, 2022, 10:02pm UTC](https://discuss.elastic.co/t/case-insensitive-sort-on-a-field-using-app-search/252990/3 "2022-02-01T22:02:31Z")

</div>

I'd suggest indexing both a mixed-case field and an all-lower-case version of the field, so that you can sort on one, and display the other.

If you have a support relationship with Elastic, you could also file an Enhancement Request to have the sort API updated to respect case insensitivity.

---

<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:** [November 4, 2022, 8:16am UTC](https://discuss.elastic.co/t/case-insensitive-sort-on-a-field-using-app-search/252990/4 "2022-11-04T08:16:03Z")

</div>


