# Analyzer not found when it is custom

**URL:** <https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091>\
**Category:** Elasticsearch\
**Created:** [December 29, 2015, 6:37am UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091 "2015-12-29T06:37:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddharth\_gupta](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@siddharth\_gupta](https://discuss.elastic.co/u/siddharth_gupta)\
**Post date:** [December 29, 2015, 6:37am UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091/1 "2015-12-29T06:37:44Z")

</div>

When I use the following command:

curl -XGET 'x.x.x.x:9200/\_analyze?analyzer=standardAnalyzer\_Name&pretty' -d 'justice this is a  
test http'

It says :

'{  
"error" : "ElasticsearchIllegalArgumentException[failed to find analyzer [standardAnalyzer\_Name]]",  
"status" : 400  
}  
'  
Although it is there in my mapping :  
'{  
"analysis": {  
"filter": {

```
  "filter_stop_custom": {
      "type": "stop",
      "stopwords": ["Mr.", "Mrs.", "Senior", "Junior"]
  }        

```

},

"analyzer": {  
"commaAnalyzer\_titles": {  
"type" : "custom",  
"tokenizer" : "standard"  
"filter" : ["lowercase", "filter\_stop\_custom"]  
} ,  
}

}  
}'

Can anybody help me with this issue ?

Thanks  
Siddharth

---

<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:** [December 29, 2015, 6:56am UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091/2 "2015-12-29T06:56:13Z")

</div>

Can you format the analyser code so it's easier to read please.

---

<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:** [December 29, 2015, 7:26am UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091/3 "2015-12-29T07:26:25Z")

</div>

You have to specify the index name when you run the `_analyze` query.

```
curl -XGET 'x.x.x.x:9200/index/_analyze
```

---

<div class="post-metadata">

**Author:** ![siddharth\_gupta](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@siddharth\_gupta](https://discuss.elastic.co/u/siddharth_gupta)\
**Post date:** [December 29, 2015, 8:29am UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091/4 "2015-12-29T08:29:22Z")

</div>

> [@dadoonet](#):
>
> curl -XGET 'x.x.x.x:9200/index/\_analyze

Thanks for the reply!  
But still it returns the same error..

---

<div class="post-metadata">

**Author:** ![siddharth\_gupta](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@siddharth\_gupta](https://discuss.elastic.co/u/siddharth_gupta)\
**Post date:** [December 29, 2015, 8:30am UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091/5 "2015-12-29T08:30:33Z")

</div>

`{  
"analysis": {  
"filter": {

"filter\_stop\_custom": {  
"type": "stop",  
"stopwords": ["Mr.", "Mrs.", "Senior", "Junior"]  
}

},

"analyzer": {  
"commaAnalyzer\_titles": {  
"type" : "custom",  
"tokenizer" : "standard"  
"filter" : ["lowercase", "filter\_stop\_custom"]  
} ,  
}

}  
}`

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [December 29, 2015, 3:49pm UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091/6 "2015-12-29T15:49:05Z")

</div>

Due to the way custom analyzers are created, they are tied to an index that  
contains them in the mapping.

What David is saying is that you need to add a specific index to the API  
call, not just simply the word index.

Ivan

---

<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, 11:28pm UTC](https://discuss.elastic.co/t/analyzer-not-found-when-it-is-custom/38091/7 "2017-07-05T23:28:04Z")

</div>


