# Unable to do case insensetive exact match search using scripted field

**URL:** <https://discuss.elastic.co/t/unable-to-do-case-insensetive-exact-match-search-using-scripted-field/101983>\
**Category:** Kibana\
**Created:** [September 27, 2017, 1:05pm UTC](https://discuss.elastic.co/t/unable-to-do-case-insensetive-exact-match-search-using-scripted-field/101983 "2017-09-27T13:05:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajit](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ajit](https://discuss.elastic.co/u/ajit)\
**Post date:** [September 27, 2017, 1:05pm UTC](https://discuss.elastic.co/t/unable-to-do-case-insensetive-exact-match-search-using-scripted-field/101983/1 "2017-09-27T13:05:04Z")

</div>

Hi,  
There is script I used to create scripted field:

language: painless  
type: string  
doc['bank\_client\_entity\_name.keyword'].value.toLowerCase()

I wanna to do exact match using scripted field because keyword field is case sensetive so I create scripted field but it is not giving exact match.

please give me solution if I could make type as keyword for scripted field.or any other solution.

---

<div class="post-metadata">

**Author:** ![chrisronline](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrisronline/32/28230_2.png) [@chrisronline](https://discuss.elastic.co/u/chrisronline)\
**Post date:** [September 27, 2017, 6:27pm UTC](https://discuss.elastic.co/t/unable-to-do-case-insensetive-exact-match-search-using-scripted-field/101983/2 "2017-09-27T18:27:47Z")

</div>

Hi @ajit,

Can you share the query you're using with the scripted field that isn't working properly?

Thanks,  
Chris

---

<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:** [October 25, 2017, 6:28pm UTC](https://discuss.elastic.co/t/unable-to-do-case-insensetive-exact-match-search-using-scripted-field/101983/3 "2017-10-25T18:28:18Z")

</div>

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