# Analyzer configuration

**URL:** https://discuss.elastic.co/t/analyzer-configuration/13377
**Category:** Elasticsearch
**Created:** [August 28, 2013, 7:26pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377 "2013-08-28T19:26:02Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Mingfeng\_Yang](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mingfeng\_Yang](https://discuss.elastic.co/u/Mingfeng_Yang)
#### Post date: [August 28, 2013, 7:26pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/1 "2013-08-28T19:26:02Z")

</div>

How should I configure my analyzer so that search for word "search" will  
also include results containing words of its variations like "searching",  
"searched"?

Right now, I have the following in config/elasticsearch.json, but it does  
not work. "search" only matches "search"

```
"settings": {
    "analysis": {
        "analyzer": {
            "index_analyzer": {
                "tokenizer": "standard",
                "filter": ["standard", "lowercase", "stop",

```

"asciifolding", "snowball"],  
"language" : "English"  
},  
"search\_analyzer": {  
"tokenizer": "standard",  
"filter": ["standard", "lowercase", "stop",  
"asciifolding", "snowball"],  
"language" : "English"  
}  
}  
}  
}

Thanks!

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)
#### Post date: [August 28, 2013, 8:32pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/2 "2013-08-28T20:32:51Z")

</div>

take a look at the stemmer documentation  
here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)

there is an example how to configure it. You basically need to define a  
custom stemmer and configure the language there as the 'name' attribue.

simon

On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:

> How should I configure my analyzer so that search for word "search" will  
> also include results containing words of its variations like "searching",  
> "searched"?
> 
> Right now, I have the following in config/elasticsearch.json, but it does  
> not work. "search" only matches "search"
> 
> ```
> "settings": {
> "analysis": {
> "analyzer": {
> "index_analyzer": {
> "tokenizer": "standard",
> "filter": ["standard", "lowercase", "stop", 
> 
> ```
> 
> "asciifolding", "snowball"],  
> "language" : "English"  
> },  
> "search\_analyzer": {  
> "tokenizer": "standard",  
> "filter": ["standard", "lowercase", "stop",  
> "asciifolding", "snowball"],  
> "language" : "English"  
> }  
> }  
> }  
> }
> 
> Thanks!

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Mingfeng\_Yang](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mingfeng\_Yang](https://discuss.elastic.co/u/Mingfeng_Yang)
#### Post date: [August 28, 2013, 9:53pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/3 "2013-08-28T21:53:53Z")

</div>

Simon,

Thanks for the info! However, I thought my settings above did exactly  
that.

Ming-

On Wednesday, August 28, 2013 1:32:51 PM UTC-7, simonw wrote:

> take a look at the stemmer documentation here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)
> 
> there is an example how to configure it. You basically need to define a  
> custom stemmer and configure the language there as the 'name' attribue.
> 
> simon
> 
> On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:
> 
> > How should I configure my analyzer so that search for word "search" will  
> > also include results containing words of its variations like "searching",  
> > "searched"?
> > 
> > Right now, I have the following in config/elasticsearch.json, but it does  
> > not work. "search" only matches "search"
> > 
> > ```
> > "settings": {
> > "analysis": {
> > "analyzer": {
> > "index_analyzer": {
> > "tokenizer": "standard",
> > "filter": ["standard", "lowercase", "stop", 
> > 
> > ```
> > 
> > "asciifolding", "snowball"],  
> > "language" : "English"  
> > },  
> > "search\_analyzer": {  
> > "tokenizer": "standard",  
> > "filter": ["standard", "lowercase", "stop",  
> > "asciifolding", "snowball"],  
> > "language" : "English"  
> > }  
> > }  
> > }  
> > }
> > 
> > Thanks!

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)
#### Post date: [August 28, 2013, 10:02pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/4 "2013-08-28T22:02:43Z")

</div>

maybe try this:

{  
"settings": {  
"analysis": {  
"analyzer": {  
"index\_analyzer": {  
"tokenizer": "standard",  
"filter": [  
"standard",  
"lowercase",  
"stop",  
"asciifolding",  
"my\_en\_snowball\_stemmer"  
]  
},  
"search\_analyzer": {  
"tokenizer": "standard",  
"filter": [  
"standard",  
"lowercase",  
"stop",  
"asciifolding",  
"my\_en\_snowball\_stemmer"  
]  
},  
"filter": {  
"my\_en\_snowball\_stemmer": {  
"type": "snowball",  
"language": "English"  
}  
}  
}  
}  
}  
}

On Wednesday, August 28, 2013 11:53:53 PM UTC+2, [mfy...@wisewindow.com](mailto:mfy...@wisewindow.com)  
wrote:

> Simon,
> 
> Thanks for the info! However, I thought my settings above did exactly  
> that.
> 
> Ming-
> 
> On Wednesday, August 28, 2013 1:32:51 PM UTC-7, simonw wrote:
> 
> > take a look at the stemmer documentation here:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)
> > 
> > there is an example how to configure it. You basically need to define a  
> > custom stemmer and configure the language there as the 'name' attribue.
> > 
> > simon
> > 
> > On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:
> > 
> > > How should I configure my analyzer so that search for word "search" will  
> > > also include results containing words of its variations like "searching",  
> > > "searched"?
> > > 
> > > Right now, I have the following in config/elasticsearch.json, but it  
> > > does not work. "search" only matches "search"
> > > 
> > > ```
> > > "settings": {
> > > "analysis": {
> > > "analyzer": {
> > > "index_analyzer": {
> > > "tokenizer": "standard",
> > > "filter": ["standard", "lowercase", "stop", 
> > > 
> > > ```
> > > 
> > > "asciifolding", "snowball"],  
> > > "language" : "English"  
> > > },  
> > > "search\_analyzer": {  
> > > "tokenizer": "standard",  
> > > "filter": ["standard", "lowercase", "stop",  
> > > "asciifolding", "snowball"],  
> > > "language" : "English"  
> > > }  
> > > }  
> > > }  
> > > }
> > > 
> > > Thanks!

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Mingfeng\_Yang](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mingfeng\_Yang](https://discuss.elastic.co/u/Mingfeng_Yang)
#### Post date: [August 28, 2013, 11:08pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/5 "2013-08-28T23:08:17Z")

</div>

No luck, :(. I am using ES 0.20.6

On Wed, Aug 28, 2013 at 3:02 PM, simonw  
[simon.willnauer@elasticsearch.com](mailto:simon.willnauer@elasticsearch.com)wrote:

> maybe try this:
> 
> {  
> "settings": {  
> "analysis": {  
> "analyzer": {  
> "index\_analyzer": {  
> "tokenizer": "standard",  
> "filter": [  
> "standard",  
> "lowercase",  
> "stop",  
> "asciifolding",  
> "my\_en\_snowball\_stemmer"  
> ]  
> },  
> "search\_analyzer": {  
> "tokenizer": "standard",  
> "filter": [  
> "standard",  
> "lowercase",  
> "stop",  
> "asciifolding",  
> "my\_en\_snowball\_stemmer"  
> ]  
> },  
> "filter": {  
> "my\_en\_snowball\_stemmer": {  
> "type": "snowball",  
> "language": "English"  
> }  
> }  
> }  
> }  
> }  
> }
> 
> On Wednesday, August 28, 2013 11:53:53 PM UTC+2, mfy...@wisewindow.comwrote:
> 
> > Simon,
> > 
> > Thanks for the info! However, I thought my settings above did exactly  
> > that.
> > 
> > Ming-
> > 
> > On Wednesday, August 28, 2013 1:32:51 PM UTC-7, simonw wrote:
> > 
> > > take a look at the stemmer documentation here: [http://www](http://www).\*\*  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/guide/) **reference/index-modules/**  
> > > analysis/stemmer-tokenfilter/[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)
> > > 
> > > there is an example how to configure it. You basically need to define a  
> > > custom stemmer and configure the language there as the 'name' attribue.
> > > 
> > > simon
> > > 
> > > On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:
> > > 
> > > > How should I configure my analyzer so that search for word "search"  
> > > > will also include results containing words of its variations like  
> > > > "searching", "searched"?
> > > > 
> > > > Right now, I have the following in config/elasticsearch.json, but it  
> > > > does not work. "search" only matches "search"
> > > > 
> > > > ```
> > > > "settings": {
> > > > "analysis": {
> > > > "analyzer": {
> > > > "index_analyzer": {
> > > > "tokenizer": "standard",
> > > > "filter": ["standard", "lowercase", "stop",
> > > > 
> > > > ```
> > > > 
> > > > "asciifolding", "snowball"],  
> > > > "language" : "English"  
> > > > },  
> > > > "search\_analyzer": {  
> > > > "tokenizer": "standard",  
> > > > "filter": ["standard", "lowercase", "stop",  
> > > > "asciifolding", "snowball"],  
> > > > "language" : "English"  
> > > > }  
> > > > }  
> > > > }  
> > > > }
> > > > 
> > > > Thanks!
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/V7ZVw\_8Wjz0/unsubscribe](https://groups.google.com/d/topic/elasticsearch/V7ZVw_8Wjz0/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)
#### Post date: [August 28, 2013, 11:30pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/6 "2013-08-28T23:30:06Z")

</div>

Assuming that your settings are correct (you should verify the settings via  
curl just to be sure), then you also need the per-type per-field mappings  
that define the string fields that use your custom analyzer.

Of course, you could always configure those settings as the default for all  
documents of all document types in all indices, but I don't remember how to  
do that anymore. I always set up the settings and mappings whenever I  
create an index so ES works exactly as I wish it to.

Hope this helps. If you need some extra help (I remember that I got a lot  
of patient help to get me started), I can perhaps help you. I do everything  
(except some initial testing in the beginning) via Java, and the schema  
work involved getting a lot of little things exactly right. The Javadoc was  
of little help, but the newsgroup saved me! So just let me know, and I'll  
pass along the favor that was given to me.

Brian

On Wednesday, August 28, 2013 7:08:17 PM UTC-4, Mingfeng Yang wrote:

> No luck, :(. I am using ES 0.20.6

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Mingfeng\_Yang](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mingfeng\_Yang](https://discuss.elastic.co/u/Mingfeng_Yang)
#### Post date: [August 28, 2013, 11:34pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/7 "2013-08-28T23:34:07Z")

</div>

The following inside config/elasticsearch.yml works though.

index:  
analysis:  
analyzer:  
default:  
tokenizer: standard  
filter: [standard, lowercase, stop, asciifolding, myfilter]  
filter:  
myfilter:  
type: snowball  
language: English

On Wed, Aug 28, 2013 at 4:08 PM, Mingfeng Yang [mfyang@wisewindow.com](mailto:mfyang@wisewindow.com)wrote:

> No luck, :(. I am using ES 0.20.6
> 
> On Wed, Aug 28, 2013 at 3:02 PM, simonw \<[simon.willnauer@elasticsearch.com](mailto:simon.willnauer@elasticsearch.com)
> 
> > wrote:
> 
> > maybe try this:
> > 
> > {  
> > "settings": {  
> > "analysis": {  
> > "analyzer": {  
> > "index\_analyzer": {  
> > "tokenizer": "standard",  
> > "filter": [  
> > "standard",  
> > "lowercase",  
> > "stop",  
> > "asciifolding",  
> > "my\_en\_snowball\_stemmer"  
> > ]  
> > },  
> > "search\_analyzer": {  
> > "tokenizer": "standard",  
> > "filter": [  
> > "standard",  
> > "lowercase",  
> > "stop",  
> > "asciifolding",  
> > "my\_en\_snowball\_stemmer"  
> > ]  
> > },  
> > "filter": {  
> > "my\_en\_snowball\_stemmer": {  
> > "type": "snowball",  
> > "language": "English"  
> > }  
> > }  
> > }  
> > }  
> > }  
> > }
> > 
> > On Wednesday, August 28, 2013 11:53:53 PM UTC+2, mfy...@wisewindow.comwrote:
> > 
> > > Simon,
> > > 
> > > Thanks for the info! However, I thought my settings above did exactly  
> > > that.
> > > 
> > > Ming-
> > > 
> > > On Wednesday, August 28, 2013 1:32:51 PM UTC-7, simonw wrote:
> > > 
> > > > take a look at the stemmer documentation here: [http://www](http://www).\*\*  
> > > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/guide/) **reference/index-modules/**  
> > > > analysis/stemmer-tokenfilter/[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)
> > > > 
> > > > there is an example how to configure it. You basically need to define a  
> > > > custom stemmer and configure the language there as the 'name' attribue.
> > > > 
> > > > simon
> > > > 
> > > > On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:
> > > > 
> > > > > How should I configure my analyzer so that search for word "search"  
> > > > > will also include results containing words of its variations like  
> > > > > "searching", "searched"?
> > > > > 
> > > > > Right now, I have the following in config/elasticsearch.json, but it  
> > > > > does not work. "search" only matches "search"
> > > > > 
> > > > > ```
> > > > > "settings": {
> > > > > "analysis": {
> > > > > "analyzer": {
> > > > > "index_analyzer": {
> > > > > "tokenizer": "standard",
> > > > > "filter": ["standard", "lowercase", "stop",
> > > > > 
> > > > > ```
> > > > > 
> > > > > "asciifolding", "snowball"],  
> > > > > "language" : "English"  
> > > > > },  
> > > > > "search\_analyzer": {  
> > > > > "tokenizer": "standard",  
> > > > > "filter": ["standard", "lowercase", "stop",  
> > > > > "asciifolding", "snowball"],  
> > > > > "language" : "English"  
> > > > > }  
> > > > > }  
> > > > > }  
> > > > > }
> > > > > 
> > > > > Thanks!
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups "elasticsearch" group.  
> > > > To unsubscribe from this topic, visit  
> > > > [https://groups.google.com/d/topic/elasticsearch/V7ZVw\_8Wjz0/unsubscribe](https://groups.google.com/d/topic/elasticsearch/V7ZVw_8Wjz0/unsubscribe).  
> > > > To unsubscribe from this group and all its topics, send an email to  
> > > > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)
#### Post date: [August 29, 2013, 8:56am UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/8 "2013-08-29T08:56:08Z")

</div>

ah I think you are missing a wrapping "index" in your settings you do  
"settings" : { "analysis" : .... but it should be "settings" : { "index" :  
{ "analysis" .....

On Thursday, August 29, 2013 1:34:07 AM UTC+2, Mingfeng Yang wrote:

> The following inside config/elasticsearch.yml works though.
> 
> index:  
> analysis:  
> analyzer:  
> default:  
> tokenizer: standard  
> filter: [standard, lowercase, stop, asciifolding, myfilter]  
> filter:  
> myfilter:  
> type: snowball  
> language: English
> 
> On Wed, Aug 28, 2013 at 4:08 PM, Mingfeng Yang \<[mfy...@wisewindow.com](mailto:mfy...@wisewindow.com)\<javascript:\>
> 
> > wrote:
> 
> > No luck, :(. I am using ES 0.20.6
> > 
> > On Wed, Aug 28, 2013 at 3:02 PM, simonw \<[simon.w...@elasticsearch.com](mailto:simon.w...@elasticsearch.com)\<javascript:\>
> > 
> > > wrote:
> > 
> > > maybe try this:
> > > 
> > > {  
> > > "settings": {  
> > > "analysis": {  
> > > "analyzer": {  
> > > "index\_analyzer": {  
> > > "tokenizer": "standard",  
> > > "filter": [  
> > > "standard",  
> > > "lowercase",  
> > > "stop",  
> > > "asciifolding",  
> > > "my\_en\_snowball\_stemmer"  
> > > ]  
> > > },  
> > > "search\_analyzer": {  
> > > "tokenizer": "standard",  
> > > "filter": [  
> > > "standard",  
> > > "lowercase",  
> > > "stop",  
> > > "asciifolding",  
> > > "my\_en\_snowball\_stemmer"  
> > > ]  
> > > },  
> > > "filter": {  
> > > "my\_en\_snowball\_stemmer": {  
> > > "type": "snowball",  
> > > "language": "English"  
> > > }  
> > > }  
> > > }  
> > > }  
> > > }  
> > > }
> > > 
> > > On Wednesday, August 28, 2013 11:53:53 PM UTC+2, mfy...@wisewindow.comwrote:
> > > 
> > > > Simon,
> > > > 
> > > > Thanks for the info! However, I thought my settings above did exactly  
> > > > that.
> > > > 
> > > > Ming-
> > > > 
> > > > On Wednesday, August 28, 2013 1:32:51 PM UTC-7, simonw wrote:
> > > > 
> > > > > take a look at the stemmer documentation here: [http://www](http://www).\*\*  
> > > > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/guide/) **reference/index-modules/**  
> > > > > analysis/stemmer-tokenfilter/[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)
> > > > > 
> > > > > there is an example how to configure it. You basically need to define  
> > > > > a custom stemmer and configure the language there as the 'name' attribue.
> > > > > 
> > > > > simon
> > > > > 
> > > > > On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:
> > > > > 
> > > > > > How should I configure my analyzer so that search for word "search"  
> > > > > > will also include results containing words of its variations like  
> > > > > > "searching", "searched"?
> > > > > > 
> > > > > > Right now, I have the following in config/elasticsearch.json, but it  
> > > > > > does not work. "search" only matches "search"
> > > > > > 
> > > > > > ```
> > > > > > "settings": {
> > > > > > "analysis": {
> > > > > > "analyzer": {
> > > > > > "index_analyzer": {
> > > > > > "tokenizer": "standard",
> > > > > > "filter": ["standard", "lowercase", "stop", 
> > > > > > 
> > > > > > ```
> > > > > > 
> > > > > > "asciifolding", "snowball"],  
> > > > > > "language" : "English"  
> > > > > > },  
> > > > > > "search\_analyzer": {  
> > > > > > "tokenizer": "standard",  
> > > > > > "filter": ["standard", "lowercase", "stop",  
> > > > > > "asciifolding", "snowball"],  
> > > > > > "language" : "English"  
> > > > > > }  
> > > > > > }  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > Thanks!
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to a topic in the  
> > > > > Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this topic, visit  
> > > > > [https://groups.google.com/d/topic/elasticsearch/V7ZVw\_8Wjz0/unsubscribe](https://groups.google.com/d/topic/elasticsearch/V7ZVw_8Wjz0/unsubscribe).  
> > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [August 29, 2013, 9:11am UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/9 "2013-08-29T09:11:26Z")

</div>

Just out of curiosity, did you have a look at Kstem? [1]  
IMO it is better than snowball, though YMMW.

Regards,  
Lukas

[1]

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Thu, Aug 29, 2013 at 10:56 AM, simonw  
[simon.willnauer@elasticsearch.com](mailto:simon.willnauer@elasticsearch.com)wrote:

> ah I think you are missing a wrapping "index" in your settings you do  
> "settings" : { "analysis" : .... but it should be "settings" : { "index" :  
> { "analysis" .....
> 
> On Thursday, August 29, 2013 1:34:07 AM UTC+2, Mingfeng Yang wrote:
> 
> > The following inside config/elasticsearch.yml works though.
> > 
> > index:  
> > analysis:  
> > analyzer:  
> > default:  
> > tokenizer: standard  
> > filter: [standard, lowercase, stop, asciifolding,  
> > myfilter]  
> > filter:  
> > myfilter:  
> > type: snowball  
> > language: English
> > 
> > On Wed, Aug 28, 2013 at 4:08 PM, Mingfeng Yang [mfy...@wisewindow.com](mailto:mfy...@wisewindow.com)wrote:
> > 
> > > No luck, :(. I am using ES 0.20.6
> > > 
> > > On Wed, Aug 28, 2013 at 3:02 PM, simonw \<simon.w...@\*\*[elasticsearch.com](http://elasticsearch.com)\>wrote:
> > > 
> > > > maybe try this:
> > > > 
> > > > {  
> > > > "settings": {  
> > > > "analysis": {  
> > > > "analyzer": {  
> > > > "index\_analyzer": {  
> > > > "tokenizer": "standard",  
> > > > "filter": [  
> > > > "standard",  
> > > > "lowercase",  
> > > > "stop",  
> > > > "asciifolding",  
> > > > "my\_en\_snowball\_stemmer"  
> > > > ]  
> > > > },  
> > > > "search\_analyzer": {  
> > > > "tokenizer": "standard",  
> > > > "filter": [  
> > > > "standard",  
> > > > "lowercase",  
> > > > "stop",  
> > > > "asciifolding",  
> > > > "my\_en\_snowball\_stemmer"  
> > > > ]  
> > > > },  
> > > > "filter": {  
> > > > "my\_en\_snowball\_stemmer": {  
> > > > "type": "snowball",  
> > > > "language": "English"  
> > > > }  
> > > > }  
> > > > }  
> > > > }  
> > > > }  
> > > > }
> > > > 
> > > > On Wednesday, August 28, 2013 11:53:53 PM UTC+2, mfy...@wisewindow.comwrote:
> > > > 
> > > > > Simon,
> > > > > 
> > > > > Thanks for the info! However, I thought my settings above did exactly  
> > > > > that.
> > > > > 
> > > > > Ming-
> > > > > 
> > > > > On Wednesday, August 28, 2013 1:32:51 PM UTC-7, simonw wrote:
> > > > > 
> > > > > > take a look at the stemmer documentation here: [http://www](http://www).\*\*  
> > > > > > elasticsearch\*\*.org/guide/\*\*reference/index- **modules/**  
> > > > > > analysis/stemmer-\*\*tokenfilter/[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)
> > > > > > 
> > > > > > there is an example how to configure it. You basically need to define  
> > > > > > a custom stemmer and configure the language there as the 'name' attribue.
> > > > > > 
> > > > > > simon
> > > > > > 
> > > > > > On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:
> > > > > > 
> > > > > > > How should I configure my analyzer so that search for word "search"  
> > > > > > > will also include results containing words of its variations like  
> > > > > > > "searching", "searched"?
> > > > > > > 
> > > > > > > Right now, I have the following in config/elasticsearch.json, but it  
> > > > > > > does not work. "search" only matches "search"
> > > > > > > 
> > > > > > > ```
> > > > > > > "settings": {
> > > > > > > "analysis": {
> > > > > > > "analyzer": {
> > > > > > > "index_analyzer": {
> > > > > > > "tokenizer": "standard",
> > > > > > > "filter": ["standard", "lowercase", "stop",
> > > > > > > 
> > > > > > > ```
> > > > > > > 
> > > > > > > "asciifolding", "snowball"],  
> > > > > > > "language" : "English"  
> > > > > > > },  
> > > > > > > "search\_analyzer": {  
> > > > > > > "tokenizer": "standard",  
> > > > > > > "filter": ["standard", "lowercase", "stop",  
> > > > > > > "asciifolding", "snowball"],  
> > > > > > > "language" : "English"  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }
> > > > > > > 
> > > > > > > Thanks!
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to a topic in the  
> > > > > > Google Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)\*\*  
> > > > > > topic/elasticsearch/V7ZVw\_\*\*8Wjz0/unsubscribe[https://groups.google.com/d/topic/elasticsearch/V7ZVw\_8Wjz0/unsubscribe](https://groups.google.com/d/topic/elasticsearch/V7ZVw_8Wjz0/unsubscribe)  
> > > > > > .  
> > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Mingfeng\_Yang](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mingfeng\_Yang](https://discuss.elastic.co/u/Mingfeng_Yang)
#### Post date: [August 29, 2013, 4:05pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/10 "2013-08-29T16:05:54Z")

</div>

Brian,

It's very sweet of you! Really appreciate it. And that's why I like open  
source community so much.

Ming-

On Wed, Aug 28, 2013 at 4:30 PM, InquiringMind [brian.from.fl@gmail.com](mailto:brian.from.fl@gmail.com)wrote:

> Assuming that your settings are correct (you should verify the settings  
> via curl just to be sure), then you also need the per-type per-field  
> mappings that define the string fields that use your custom analyzer.
> 
> Of course, you could always configure those settings as the default for  
> all documents of all document types in all indices, but I don't remember  
> how to do that anymore. I always set up the settings and mappings whenever  
> I create an index so ES works exactly as I wish it to.
> 
> Hope this helps. If you need some extra help (I remember that I got a lot  
> of patient help to get me started), I can perhaps help you. I do everything  
> (except some initial testing in the beginning) via Java, and the schema  
> work involved getting a lot of little things exactly right. The Javadoc was  
> of little help, but the newsgroup saved me! So just let me know, and I'll  
> pass along the favor that was given to me.
> 
> Brian
> 
> On Wednesday, August 28, 2013 7:08:17 PM UTC-4, Mingfeng Yang wrote:
> 
> > No luck, :(. I am using ES 0.20.6
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/V7ZVw\_8Wjz0/unsubscribe](https://groups.google.com/d/topic/elasticsearch/V7ZVw_8Wjz0/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Mingfeng\_Yang](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Mingfeng\_Yang](https://discuss.elastic.co/u/Mingfeng_Yang)
#### Post date: [August 29, 2013, 4:08pm UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/11 "2013-08-29T16:08:01Z")

</div>

I tried put "index" there, but it does not work. Is the setting in  
elasticsearch.json any different from settings in elasticsearch.yml?

On Thu, Aug 29, 2013 at 1:56 AM, simonw  
[simon.willnauer@elasticsearch.com](mailto:simon.willnauer@elasticsearch.com)wrote:

> ah I think you are missing a wrapping "index" in your settings you do  
> "settings" : { "analysis" : .... but it should be "settings" : { "index" :  
> { "analysis" .....
> 
> On Thursday, August 29, 2013 1:34:07 AM UTC+2, Mingfeng Yang wrote:
> 
> > The following inside config/elasticsearch.yml works though.
> > 
> > index:  
> > analysis:  
> > analyzer:  
> > default:  
> > tokenizer: standard  
> > filter: [standard, lowercase, stop, asciifolding,  
> > myfilter]  
> > filter:  
> > myfilter:  
> > type: snowball  
> > language: English
> > 
> > On Wed, Aug 28, 2013 at 4:08 PM, Mingfeng Yang [mfy...@wisewindow.com](mailto:mfy...@wisewindow.com)wrote:
> > 
> > > No luck, :(. I am using ES 0.20.6
> > > 
> > > On Wed, Aug 28, 2013 at 3:02 PM, simonw \<simon.w...@\*\*[elasticsearch.com](http://elasticsearch.com)\>wrote:
> > > 
> > > > maybe try this:
> > > > 
> > > > {  
> > > > "settings": {  
> > > > "analysis": {  
> > > > "analyzer": {  
> > > > "index\_analyzer": {  
> > > > "tokenizer": "standard",  
> > > > "filter": [  
> > > > "standard",  
> > > > "lowercase",  
> > > > "stop",  
> > > > "asciifolding",  
> > > > "my\_en\_snowball\_stemmer"  
> > > > ]  
> > > > },  
> > > > "search\_analyzer": {  
> > > > "tokenizer": "standard",  
> > > > "filter": [  
> > > > "standard",  
> > > > "lowercase",  
> > > > "stop",  
> > > > "asciifolding",  
> > > > "my\_en\_snowball\_stemmer"  
> > > > ]  
> > > > },  
> > > > "filter": {  
> > > > "my\_en\_snowball\_stemmer": {  
> > > > "type": "snowball",  
> > > > "language": "English"  
> > > > }  
> > > > }  
> > > > }  
> > > > }  
> > > > }  
> > > > }
> > > > 
> > > > On Wednesday, August 28, 2013 11:53:53 PM UTC+2, mfy...@wisewindow.comwrote:
> > > > 
> > > > > Simon,
> > > > > 
> > > > > Thanks for the info! However, I thought my settings above did exactly  
> > > > > that.
> > > > > 
> > > > > Ming-
> > > > > 
> > > > > On Wednesday, August 28, 2013 1:32:51 PM UTC-7, simonw wrote:
> > > > > 
> > > > > > take a look at the stemmer documentation here: [http://www](http://www).\*\*  
> > > > > > elasticsearch\*\*.org/guide/\*\*reference/index- **modules/**  
> > > > > > analysis/stemmer-\*\*tokenfilter/[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-tokenfilter/)
> > > > > > 
> > > > > > there is an example how to configure it. You basically need to define  
> > > > > > a custom stemmer and configure the language there as the 'name' attribue.
> > > > > > 
> > > > > > simon
> > > > > > 
> > > > > > On Wednesday, August 28, 2013 9:26:02 PM UTC+2, Mingfeng Yang wrote:
> > > > > > 
> > > > > > > How should I configure my analyzer so that search for word "search"  
> > > > > > > will also include results containing words of its variations like  
> > > > > > > "searching", "searched"?
> > > > > > > 
> > > > > > > Right now, I have the following in config/elasticsearch.json, but it  
> > > > > > > does not work. "search" only matches "search"
> > > > > > > 
> > > > > > > ```
> > > > > > > "settings": {
> > > > > > > "analysis": {
> > > > > > > "analyzer": {
> > > > > > > "index_analyzer": {
> > > > > > > "tokenizer": "standard",
> > > > > > > "filter": ["standard", "lowercase", "stop",
> > > > > > > 
> > > > > > > ```
> > > > > > > 
> > > > > > > "asciifolding", "snowball"],  
> > > > > > > "language" : "English"  
> > > > > > > },  
> > > > > > > "search\_analyzer": {  
> > > > > > > "tokenizer": "standard",  
> > > > > > > "filter": ["standard", "lowercase", "stop",  
> > > > > > > "asciifolding", "snowball"],  
> > > > > > > "language" : "English"  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }
> > > > > > > 
> > > > > > > Thanks!
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to a topic in the  
> > > > > > Google Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)\*\*  
> > > > > > topic/elasticsearch/V7ZVw\_\*\*8Wjz0/unsubscribe[https://groups.google.com/d/topic/elasticsearch/V7ZVw\_8Wjz0/unsubscribe](https://groups.google.com/d/topic/elasticsearch/V7ZVw_8Wjz0/unsubscribe)  
> > > > > > .  
> > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/V7ZVw\_8Wjz0/unsubscribe](https://groups.google.com/d/topic/elasticsearch/V7ZVw_8Wjz0/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:18am UTC](https://discuss.elastic.co/t/analyzer-configuration/13377/12 "2017-07-06T02:18:58Z")

</div>


