# How to create analyzer mapping for custom analyzer

**URL:** <https://discuss.elastic.co/t/how-to-create-analyzer-mapping-for-custom-analyzer/6281>\
**Category:** Elasticsearch\
**Created:** [January 4, 2012, 7:07am UTC](https://discuss.elastic.co/t/how-to-create-analyzer-mapping-for-custom-analyzer/6281 "2012-01-04T07:07:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)\
**Post date:** [January 4, 2012, 7:07am UTC](https://discuss.elastic.co/t/how-to-create-analyzer-mapping-for-custom-analyzer/6281/1 "2012-01-04T07:07:30Z")

</div>

Hi

I try following mapping for custom analyzer:

{ "index" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" :  
"1" ,"\_analyzer"="myanalyzer" } }  
{ "tweet" : { "text" : "this is a tweet" } }  
{ "myanalyzer" :  
{  
"type" : "custom",  
"tokenizer" : "standard",  
"filter" : {"asciifolding","stop":{"stopwords":  
{"stop1","stop2"}},"length":{"min":"0","max":"2000"},"snowball",  
"standard", "lowercase"}  
}  
}  
{ "delete" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" :  
"2" } }  
{ "create" : { "\_index" : "twitter", "\_type" : "tweet", "\_id" :  
"1" } }  
{ "tweet" : { "text" : "another tweet" } }

please correct me if mapping is wrong. what will be correct mapping.

Thanks

---

<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 6, 2017, 3:43am UTC](https://discuss.elastic.co/t/how-to-create-analyzer-mapping-for-custom-analyzer/6281/2 "2017-07-06T03:43:53Z")

</div>


