# Index and search analyzer in Elastic search 2.3.2

**URL:** <https://discuss.elastic.co/t/index-and-search-analyzer-in-elastic-search-2-3-2/49397>\
**Category:** Elasticsearch\
**Created:** [May 6, 2016, 10:20am UTC](https://discuss.elastic.co/t/index-and-search-analyzer-in-elastic-search-2-3-2/49397 "2016-05-06T10:20:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gopin4hat7ash](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@gopin4hat7ash](https://discuss.elastic.co/u/gopin4hat7ash)\
**Post date:** [May 6, 2016, 10:20am UTC](https://discuss.elastic.co/t/index-and-search-analyzer-in-elastic-search-2-3-2/49397/1 "2016-05-06T10:20:17Z")

</div>

In Elastic search 2.3.2, we added the mappings as below

"ata": {  
"type": "string",  
"analyzer": "hyphenFieldIndexAnalyzer"  
}

GET bfm\_comv2\_es\_idx/part/\_search?size=500  
{  
"query": {  
"match": {  
"ata": "23-12-11"  
}  
}  
}

It gives 40 appropriate results which is right

If we give want to give the multiple analyzer, one for index and another for search  
How can we give in mappings??

Whether it will work

"administrativeTrackingNumber": {  
"type": "string",  
"analyzer": "whitespaceAnalyzer",  
"search\_analyzer": "hyphenFieldSearchAnalyzer"  
},

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 7, 2016, 9:06am UTC](https://discuss.elastic.co/t/index-and-search-analyzer-in-elastic-search-2-3-2/49397/2 "2016-05-07T09:06:11Z")

</div>

That is correct - [https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-analyzer.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-analyzer.html)

---

<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:** [July 5, 2017, 10:53pm UTC](https://discuss.elastic.co/t/index-and-search-analyzer-in-elastic-search-2-3-2/49397/3 "2017-07-05T22:53:13Z")

</div>


