# Need help with a select type field

**URL:** <https://discuss.elastic.co/t/need-help-with-a-select-type-field/233371>\
**Category:** Elasticsearch\
**Created:** [May 19, 2020, 4:03pm UTC](https://discuss.elastic.co/t/need-help-with-a-select-type-field/233371 "2020-05-19T16:03:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Change\_Shell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/change_shell/32/47277_2.png) [@Change\_Shell](https://discuss.elastic.co/u/Change_Shell)\
**Post date:** [May 19, 2020, 4:03pm UTC](https://discuss.elastic.co/t/need-help-with-a-select-type-field/233371/1 "2020-05-19T16:03:14Z")

</div>

Hello everyone, I will put a field to document in format UA-2020-1605-er. But users can search in a case insensitive like ua-2020-1605-er or UA-2020-1605-ER, length, and format always the same. If I try set type `"UaId": { "type": "keyword" }` Term-query ignore sensitive, also I set type `"UaId": { "type": "text" }` Match-query found a lot of extra documents. What type of field and query I must use for this case?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 19, 2020, 4:09pm UTC](https://discuss.elastic.co/t/need-help-with-a-select-type-field/233371/2 "2020-05-19T16:09:08Z")

</div>

Use a keyword mapping with a lowercase normaliser.

---

<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:** [June 16, 2020, 4:09pm UTC](https://discuss.elastic.co/t/need-help-with-a-select-type-field/233371/3 "2020-06-16T16:09:29Z")

</div>

Closed on June 16, 2020, 4:09pm UTC

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