# Keyword type: aggregation case insensitive

**URL:** <https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682>\
**Category:** Elasticsearch\
**Created:** [April 18, 2017, 9:50am UTC](https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682 "2017-04-18T09:50:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giovanni\_Caputo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giovanni_caputo/32/10580_2.png) [@Giovanni\_Caputo](https://discuss.elastic.co/u/Giovanni_Caputo)\
**Post date:** [April 18, 2017, 9:50am UTC](https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682/1 "2017-04-18T09:50:09Z")

</div>

I have a problem with keyword type:  
can i aggregate a a file with a keyword type wihout losing the case and sorting case insensitive?

Using the normalizer and lowercase filter lose the the case.  
using the text type must enable fielddata that can consume a lot of heap space, especially when loading high cardinality

Elasticsearch version: 5..2

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [April 21, 2017, 8:02am UTC](https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682/2 "2017-04-21T08:02:49Z")

</div>

not sure I understand, why do you use the normalizer if you don't want to do case folding?

---

<div class="post-metadata">

**Author:** ![Giovanni\_Caputo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giovanni_caputo/32/10580_2.png) [@Giovanni\_Caputo](https://discuss.elastic.co/u/Giovanni_Caputo)\
**Post date:** [April 21, 2017, 10:05am UTC](https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682/3 "2017-04-21T10:05:57Z")

</div>

> [@s1monw](#):
>
> folding

Because i want sort term aggregation(case insensitive) with "order" : { "\_term" : "asc" }

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [April 21, 2017, 12:16pm UTC](https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682/4 "2017-04-21T12:16:52Z")

</div>

oh sorry I misread your initial post. What you are trying to do is not possible today, sorry!

---

<div class="post-metadata">

**Author:** ![Giovanni\_Caputo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giovanni_caputo/32/10580_2.png) [@Giovanni\_Caputo](https://discuss.elastic.co/u/Giovanni_Caputo)\
**Post date:** [April 21, 2017, 12:31pm UTC](https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682/5 "2017-04-21T12:31:53Z")

</div>

Can I open an issue on github repository?

---

<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:** [May 19, 2017, 12:33pm UTC](https://discuss.elastic.co/t/keyword-type-aggregation-case-insensitive/82682/6 "2017-05-19T12:33:48Z")

</div>

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