# Case-Insensitive regex-based search for text fields in ES 5.6.3

**URL:** <https://discuss.elastic.co/t/case-insensitive-regex-based-search-for-text-fields-in-es-5-6-3/180681>\
**Category:** Elasticsearch\
**Created:** [May 12, 2019, 5:36am UTC](https://discuss.elastic.co/t/case-insensitive-regex-based-search-for-text-fields-in-es-5-6-3/180681 "2019-05-12T05:36:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Umang\_Mishra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umang_mishra/32/45180_2.png) [@Umang\_Mishra](https://discuss.elastic.co/u/Umang_Mishra)\
**Post date:** [May 12, 2019, 5:36am UTC](https://discuss.elastic.co/t/case-insensitive-regex-based-search-for-text-fields-in-es-5-6-3/180681/1 "2019-05-12T05:36:11Z")

</div>

I am trying to perform regex-based, case-insensitive search for text field.

Here is my settings and mapping details.  
{  
"settings":{  
"analysis":{  
"analyzer":{  
"text\_analyzer":{  
"type":"custom",  
"tokenizer":"standard",  
"filter": ["lowercase", "uppercase"]  
}  
}  
},  
"number\_of\_shards" : 1,  
"number\_of\_replicas" : 0   
}  
}  
{  
"properties" : {  
"rv11" : {  
"type" : "text",  
"analyzer" : "text\_analyzer"  
},  
"rv22" : {  
"type" : "keyword"  
}   
}  
}

"rv11" field has "RESTServices" value.

For /\_search?q=rv11:/._REST._/ I'm getting results.  
But for /\_search?q=rv11:/._rest._/ I'm not getting any result.

My requirement is that it should work in both cases irrespective of the letter-cases.

---

<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 9, 2019, 5:36am UTC](https://discuss.elastic.co/t/case-insensitive-regex-based-search-for-text-fields-in-es-5-6-3/180681/2 "2019-06-09T05:36:15Z")

</div>

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