# ElasticsearchIllegalArgumentException\[failed to find analyzer type \[null\] or tokenizer for \[autocomplete\]\]

**URL:** https://discuss.elastic.co/t/elasticsearchillegalargumentexception-failed-to-find-analyzer-type-null-or-tokenizer-for-autocomplete/17206
**Category:** Elasticsearch
**Created:** [April 25, 2014, 8:29pm UTC](https://discuss.elastic.co/t/elasticsearchillegalargumentexception-failed-to-find-analyzer-type-null-or-tokenizer-for-autocomplete/17206 "2014-04-25T20:29:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Gene\_Aiello](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gene_aiello/32/1610_2.png) [@Gene\_Aiello](https://discuss.elastic.co/u/Gene_Aiello)
#### Post date: [April 25, 2014, 8:29pm UTC](https://discuss.elastic.co/t/elasticsearchillegalargumentexception-failed-to-find-analyzer-type-null-or-tokenizer-for-autocomplete/17206/1 "2014-04-25T20:29:05Z")

</div>

I am trying to add autocomplete to my search index.  
I am struggling to trying to get the syntax correct.  
I have search and found solutions to similar solutions but still can't seem  
to get my syntax to work.  
Please tell me what is wrong....

PUT /my\_index  
{  
"settings": {  
"analysis": {  
"filter": {  
"autocomplete\_filter": {  
"type": "edgeNGram",  
"min\_gram": 2,  
"max\_gram": 20,  
"token\_chars": [  
"letter",  
"digit"  
]  
}  
},  
"analyzer": {  
"my\_standard\_analyzer": {  
"type": "standard",  
"stopwords": []  
},  
"autocomplete": {  
"title": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"lowercase",  
"autocomplete\_filter"  
]  
}  
}  
}  
}  
},  
"mappings": {  
"title": {  
"properties": {  
"title": {  
"type": "multi\_field",  
"fields": {  
"title": {  
"type": "string",  
"analyzer": "title"  
},  
"autocomplete": {  
"type": "string",  
"index\_analyzer": "autocomplete",  
"search\_analyzer": "title"  
}  
}  
}  
}  
}  
}  
}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/30b02d2d-bc0e-4774-9057-3a2ed10abb3d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30b02d2d-bc0e-4774-9057-3a2ed10abb3d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Gene\_Aiello](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gene_aiello/32/1610_2.png) [@Gene\_Aiello](https://discuss.elastic.co/u/Gene_Aiello)
#### Post date: [April 26, 2014, 2:46pm UTC](https://discuss.elastic.co/t/elasticsearchillegalargumentexception-failed-to-find-analyzer-type-null-or-tokenizer-for-autocomplete/17206/2 "2014-04-26T14:46:31Z")

</div>

I am going to answer my own question and hope it helps someone else, below  
is how I fixed it.  
A few things were wrong, but I was also using the wrong names of my  
analyzers in my mappings...

PUT /de\_assets\_index  
{  
"settings":{  
"analysis":{  
"filter":{  
"autocomplete\_filter":{  
"type":"edge\_ngram",  
"min\_gram":1,  
"max\_gram":20,  
"token\_chars": [  
"letter",  
"digit"  
]  
}  
},  
"analyzer":{  
"autocomplete":{  
"type":"custom",  
"tokenizer":"standard",  
"filter":[  
"lowercase",  
"autocomplete\_filter"  
]  
},  
"my\_standard\_analyzer": {  
"type": "standard",  
"stopwords":   
}  
}  
}  
},  
"mappings": {  
"title": {  
"properties": {  
"title": {  
"type": "multi\_field",  
"fields": {  
"title": {  
"type": "string",  
"analyzer": "my\_standard\_analyzer"  
},  
"autocomplete": {  
"type": "string",  
"index\_analyzer": "autocomplete",  
"search\_analyzer": "my\_standard\_analyzer"  
}  
}  
}  
}  
}  
}  
}

On Friday, April 25, 2014 3:29:05 PM UTC-5, Gene Aiello wrote:

> I am trying to add autocomplete to my search index.  
> I am struggling to trying to get the syntax correct.  
> I have search and found solutions to similar solutions but still can't  
> seem to get my syntax to work.  
> Please tell me what is wrong....
> 
> PUT /my\_index  
> {  
> "settings": {  
> "analysis": {  
> "filter": {  
> "autocomplete\_filter": {  
> "type": "edgeNGram",  
> "min\_gram": 2,  
> "max\_gram": 20,  
> "token\_chars": [  
> "letter",  
> "digit"  
> ]  
> }  
> },  
> "analyzer": {  
> "my\_standard\_analyzer": {  
> "type": "standard",  
> "stopwords":   
> },  
> "autocomplete": {  
> "title": {  
> "type": "custom",  
> "tokenizer": "standard",  
> "filter": [  
> "lowercase",  
> "autocomplete\_filter"  
> ]  
> }  
> }  
> }  
> }  
> },  
> "mappings": {  
> "title": {  
> "properties": {  
> "title": {  
> "type": "multi\_field",  
> "fields": {  
> "title": {  
> "type": "string",  
> "analyzer": "title"  
> },  
> "autocomplete": {  
> "type": "string",  
> "index\_analyzer": "autocomplete",  
> "search\_analyzer": "title"  
> }  
> }  
> }  
> }  
> }  
> }  
> }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5cf77e2e-33e8-44a4-b95b-e17f0527f653%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5cf77e2e-33e8-44a4-b95b-e17f0527f653%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:33am UTC](https://discuss.elastic.co/t/elasticsearchillegalargumentexception-failed-to-find-analyzer-type-null-or-tokenizer-for-autocomplete/17206/3 "2017-07-06T01:33:18Z")

</div>


