# Unable to set custom analyzer on text field

**URL:** <https://discuss.elastic.co/t/unable-to-set-custom-analyzer-on-text-field/158170>\
**Category:** Elasticsearch\
**Created:** [November 26, 2018, 11:57am UTC](https://discuss.elastic.co/t/unable-to-set-custom-analyzer-on-text-field/158170 "2018-11-26T11:57:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jannick](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jannick](https://discuss.elastic.co/u/jannick)\
**Post date:** [November 26, 2018, 11:57am UTC](https://discuss.elastic.co/t/unable-to-set-custom-analyzer-on-text-field/158170/1 "2018-11-26T11:57:08Z")

</div>

Hi,

I'm trying to define a custom analyzer for use on a 'text' type field in Elasticsearch 6.3. At index creation time at get an error on the form:

Caused by: ElasticsearchException[Elasticsearch exception [type=mapper\_parsing\_exception, reason=Mapping definition for [myFulltextField] has unsupported parameters: [analyser : myAnalyzer]]]  
at org.elasticsearch.ElasticsearchException.innerFromXContent(ElasticsearchException.java:510)  
at org.elasticsearch.ElasticsearchException.fromXContent(ElasticsearchException.java:421)  
at org.elasticsearch.ElasticsearchException.innerFromXContent(ElasticsearchException.java:451)  
at org.elasticsearch.ElasticsearchException.failureFromXContent(ElasticsearchException.java:617)  
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:169)  
... 29 more

I've tried to trim the definition to a bare minimum to see if incompatible options was the problem:

{  
"settings": {  
"analysis": {  
"analyser": {  
"myAnalyzer": {  
"tokenizer": "standard"  
}  
}  
}  
},  
"mappings": {  
"doc": {  
"myFulltextField": {  
"type": "text",  
"analyser": "myAnalyzer"  
},  
......  
}  
}  
}

Any suggestion as to what is going wrong?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 26, 2018, 12:10pm UTC](https://discuss.elastic.co/t/unable-to-set-custom-analyzer-on-text-field/158170/2 "2018-11-26T12:10:46Z")

</div>

Change `analyser` by `analyzer`. I guess that should work better.

See [https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html)

---

<div class="post-metadata">

**Author:** ![jannick](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jannick](https://discuss.elastic.co/u/jannick)\
**Post date:** [November 26, 2018, 12:23pm UTC](https://discuss.elastic.co/t/unable-to-set-custom-analyzer-on-text-field/158170/3 "2018-11-26T12:23:59Z")

</div>

OMG.... I've looked at that and the documentation so many times.... Thank you.

---

<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:** [December 24, 2018, 12:24pm UTC](https://discuss.elastic.co/t/unable-to-set-custom-analyzer-on-text-field/158170/4 "2018-12-24T12:24:00Z")

</div>

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