# Override built-in analyzer

**URL:** <https://discuss.elastic.co/t/override-built-in-analyzer/14688>\
**Category:** Elasticsearch\
**Created:** [December 3, 2013, 8:05pm UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688 "2013-12-03T20:05:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sashao](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@sashao](https://discuss.elastic.co/u/sashao)\
**Post date:** [December 3, 2013, 8:05pm UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688/1 "2013-12-03T20:05:21Z")

</div>

Hello friends,

I'm trying to preserve specific characters during tokenization using  
word\_delimiter filter by defining the type\_table (as described in  
[http://www.fullscale.co/blog/2013/03/04/preserving\_specific\_characters\_during\_tokenizing\_in\_elasticsearch.html](http://www.fullscale.co/blog/2013/03/04/preserving_specific_characters_during_tokenizing_in_elasticsearch.html)).  
Actually my idea is to override the built-in English analyzer by including  
custom configured "word\_delimiter" ("type\_table": ["# =\> ALPHA", "@ =\>  
ALPHA"]) filter, but I cannot find any way to do it.  
I also tried to create a custom english analyzer but still getting next  
problems:

1. I don't actually know the default settings of the built-in english  
analyzer (But I really want to preserve it)
2. While trying to set "tokenizer": english getting an error on creating  
index, saying that english tokenizer is not found.  
I'm using 0.90.5 ES

Hope for your kind help!  
Sasha

--  
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/567ca0cf-d5d1-4e55-9e8c-b7b1833bb47c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/567ca0cf-d5d1-4e55-9e8c-b7b1833bb47c%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Kurt\_Hurtado](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@Kurt\_Hurtado](https://discuss.elastic.co/u/Kurt_Hurtado)\
**Post date:** [December 3, 2013, 8:42pm UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688/2 "2013-12-03T20:42:41Z")

</div>

Hi Sasha,  
Would you mind posting the full curl commands or some other representation  
of the settings and mappings you're creating?  
Thanks!

On Tuesday, December 3, 2013 12:05:21 PM UTC-8, Sasha Ostrikov wrote:

> Hello friends,
> 
> I'm trying to preserve specific characters during tokenization using  
> word\_delimiter filter by defining the type\_table (as described in  
> [The domain name Fullscale.co is for sale | Dan.com](http://www.fullscale.co/blog/2013/03/04/preserving_specific_characters_during_tokenizing_in_elasticsearch.html)  
> ).  
> Actually my idea is to override the built-in English analyzer by including  
> custom configured "word\_delimiter" ("type\_table": ["# =\> ALPHA", "@ =\>  
> ALPHA"]) filter, but I cannot find any way to do it.  
> I also tried to create a custom english analyzer but still getting next  
> problems:
> 
> 1. I don't actually know the default settings of the built-in english  
> analyzer (But I really want to preserve it)
> 2. While trying to set "tokenizer": english getting an error on creating  
> index, saying that english tokenizer is not found.  
> I'm using 0.90.5 ES
> 
> Hope for your kind help!  
> Sasha

--  
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/39104357-6606-4b89-af71-6bb7bc74d8e2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/39104357-6606-4b89-af71-6bb7bc74d8e2%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![sashao](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@sashao](https://discuss.elastic.co/u/sashao)\
**Post date:** [December 4, 2013, 9:59am UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688/3 "2013-12-04T09:59:01Z")

</div>

Sure, so this is my configuration (using Sense plugin for chrome):  
POST \_template/temp1  
{  
"template": "_",  
"order": "5",  
"settings": {  
"index": {  
"analysis": {  
"filter": {  
"word\_delimiter\_filter": {  
"type": "word\_delimiter",  
"generate\_word\_parts": false,  
"catenate\_words": true,  
"split\_on\_numerics": false,  
"preserve\_original": true,  
"type\_table": [  
"# =\> ALPHA",  
"@ =\> ALPHA",  
"% =\> ALPHA",  
"$ =\> ALPHA",  
"% =\> ALPHA"  
]  
},  
"stop\_english": {  
"type": "stop",  
"stopwords": [  
"english"  
]  
},  
"english\_stemmer": {  
"type": "stemmer",  
"name": "english"  
}  
},  
"analyzer": {  
"english": { //HERE I'M TRYING TO OVERRIDE THE BUILT IN english  
ANALYZER  
"filter": [  
"word\_delimiter\_filter"  
]  
},  
"english2": { //HERE I'M TRYING TO CONFIG MY OWN english  
ANALYZER THAT WOULD BEHAVE LIKE THE BUILT IN  
"type": "custom",  
"tokenizer": "english",  
"filter": [  
"lowercase",  
"word\_delimiter\_filter",  
"english\_stemmer",  
"stop\_english"  
]  
}  
}  
}  
}  
},  
"mappings": {  
"default": {  
"dynamic\_templates": [  
{  
"template\_textEnglish": {  
"match": "text.English._",  
"mapping": {  
"type": "string",  
"store": "yes",  
"index": "analyzed",  
"analyzer": "english",  
"term\_vector": "with\_positions\_offsets"  
}  
}  
},  
{  
"template\_textEnglish": {  
"match": "text.English2.\*",  
"mapping": {  
"type": "string",  
"store": "yes",  
"index": "analyzed",  
"analyzer": "english2",  
"term\_vector": "with\_positions\_offsets"  
}  
}  
}  
]  
}  
}  
}

and this is the error I get trying to create a new index:  
{  
"error": "IndexCreationException[[test1] failed to create index];  
nested: ElasticSearchIllegalArgumentException[failed to find analyzer type  
[null] or tokenizer for [english]]; ",  
"status": 400  
}

On Tuesday, December 3, 2013 10:42:41 PM UTC+2, Kurt Hurtado wrote:

> Hi Sasha,  
> Would you mind posting the full curl commands or some other representation  
> of the settings and mappings you're creating?  
> Thanks!
> 
> On Tuesday, December 3, 2013 12:05:21 PM UTC-8, Sasha Ostrikov wrote:
> 
> > Hello friends,
> > 
> > I'm trying to preserve specific characters during tokenization using  
> > word\_delimiter filter by defining the type\_table (as described in  
> > [The domain name Fullscale.co is for sale | Dan.com](http://www.fullscale.co/blog/2013/03/04/preserving_specific_characters_during_tokenizing_in_elasticsearch.html)  
> > ).  
> > Actually my idea is to override the built-in English analyzer by  
> > including custom configured "word\_delimiter" ("type\_table": ["# =\> ALPHA",  
> > "@ =\> ALPHA"]) filter, but I cannot find any way to do it.  
> > I also tried to create a custom english analyzer but still getting next  
> > problems:
> > 
> > 1. I don't actually know the default settings of the built-in english  
> > analyzer (But I really want to preserve it)
> > 2. While trying to set "tokenizer": english getting an error on creating  
> > index, saying that english tokenizer is not found.  
> > I'm using 0.90.5 ES
> > 
> > Hope for your kind help!  
> > Sasha

--  
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/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 4, 2013, 10:28am UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688/4 "2013-12-04T10:28:21Z")

</div>

english tokenizer does not exist.  
english analyzer uses a standard tokenizer.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 4 décembre 2013 at 10:59:08, Sasha Ostrikov ([alexander.ostrikov@gmail.com](mailto:alexander.ostrikov@gmail.com)) a écrit:

Sure, so this is my configuration (using Sense plugin for chrome):  
POST \_template/temp1  
{  
"template": "_",  
"order": "5",  
"settings": {  
"index": {  
"analysis": {  
"filter": {  
"word\_delimiter\_filter": {  
"type": "word\_delimiter",  
"generate\_word\_parts": false,  
"catenate\_words": true,  
"split\_on\_numerics": false,  
"preserve\_original": true,  
"type\_table": [  
"# =\> ALPHA",  
"@ =\> ALPHA",  
"% =\> ALPHA",  
"$ =\> ALPHA",  
"% =\> ALPHA"  
]  
},  
"stop\_english": {  
"type": "stop",  
"stopwords": [  
"english"  
]  
},  
"english\_stemmer": {  
"type": "stemmer",  
"name": "english"  
}  
},  
"analyzer": {  
"english": { //HERE I'M TRYING TO OVERRIDE THE BUILT IN english ANALYZER  
"filter": [  
"word\_delimiter\_filter"  
]  
},  
"english2": { //HERE I'M TRYING TO CONFIG MY OWN english ANALYZER THAT WOULD BEHAVE LIKE THE BUILT IN  
"type": "custom",  
"tokenizer": "english",  
"filter": [  
"lowercase",  
"word\_delimiter\_filter",  
"english\_stemmer",  
"stop\_english"  
]  
}  
}  
}  
}  
},  
"mappings": {  
"default": {  
"dynamic\_templates": [  
{  
"template\_textEnglish": {  
"match": "text.English._",  
"mapping": {  
"type": "string",  
"store": "yes",  
"index": "analyzed",  
"analyzer": "english",  
"term\_vector": "with\_positions\_offsets"  
}  
}  
},  
{  
"template\_textEnglish": {  
"match": "text.English2.\*",  
"mapping": {  
"type": "string",  
"store": "yes",  
"index": "analyzed",  
"analyzer": "english2",  
"term\_vector": "with\_positions\_offsets"  
}  
}  
}  
]  
}  
}  
}

and this is the error I get trying to create a new index:  
{  
"error": "IndexCreationException[[test1] failed to create index]; nested: ElasticSearchIllegalArgumentException[failed to find analyzer type [null] or tokenizer for [english]]; ",  
"status": 400  
}

On Tuesday, December 3, 2013 10:42:41 PM UTC+2, Kurt Hurtado wrote:  
Hi Sasha,  
Would you mind posting the full curl commands or some other representation of the settings and mappings you're creating?  
Thanks!

On Tuesday, December 3, 2013 12:05:21 PM UTC-8, Sasha Ostrikov wrote:  
Hello friends,

I'm trying to preserve specific characters during tokenization using word\_delimiter filter by defining the type\_table (as described in [http://www.fullscale.co/blog/2013/03/04/preserving\_specific\_characters\_during\_tokenizing\_in\_elasticsearch.html](http://www.fullscale.co/blog/2013/03/04/preserving_specific_characters_during_tokenizing_in_elasticsearch.html)).  
Actually my idea is to override the built-in English analyzer by including custom configured "word\_delimiter" ("type\_table": ["# =\> ALPHA", "@ =\> ALPHA"]) filter, but I cannot find any way to do it.  
I also tried to create a custom english analyzer but still getting next problems:

1. I don't actually know the default settings of the built-in english analyzer (But I really want to preserve it)
2. While trying to set "tokenizer": english getting an error on creating index, saying that english tokenizer is not found.  
I'm using 0.90.5 ES

## Hope for your kind help! Sasha

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/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.529f03c5.2901d82.bd3d%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.529f03c5.2901d82.bd3d%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![sashao](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@sashao](https://discuss.elastic.co/u/sashao)\
**Post date:** [December 4, 2013, 12:43pm UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688/5 "2013-12-04T12:43:48Z")

</div>

David, thanks for your answer!  
So, I"ll try to sum up the things untill this point:

1. My general purpose is to preserve specific characters during  
tokenization, so if someone searchs for "25$" he will find docs with 25$  
only and not docs with other occurrences of 25.
2. To do it I thought to customize the "word\_delimiter" filter in with  
custom "type\_table": ["$ =\> ALPHA"].
3. Now I need to include this filter into analyzer definition, so I thought  
about two options:  
a. override the built in "english" analizer - I'm not sure how do it and  
if that's possible at all, but that would probably most convinient solution  
for the specific problem.  
b. create custom english analyzer - the problem, I'm not sure what is the  
right filters list to put there to\* preserve the built-in english tokenizer  
behaviour.\*  
So untill this point and using David's comment, I thought about  
following definition:  
"settings": {  
"index": {  
"analysis": {  
"filter": {  
"custom\_word\_delimiter": {  
"type": "word\_delimiter",  
"generate\_word\_parts": false,  
"catenate\_words": true,  
"split\_on\_numerics": false,  
"preserve\_original": true,  
"type\_table": ["# =\> ALPHA"]  
},  
"stop\_english": {  
"type": "stop",  
"stopwords": [  
"_english_"  
]  
},  
"english\_stemmer": {  
"type": "stemmer",  
"name": "english"  
}  
},
  - "analyzer": {\*

- 

```
     "my_custom_english": {*

```

- 

```
       "type": "custom",*

```

- 

```
       "tokenizer": "english",*

```

- 

```
       "filter": [*

```

- 

```
         "lowercase",*

```

- 

```
         "custom_word_delimiter",*

```

- 

```
         "english_stemmer",*

```

- 

```
         "stop_english"*

```

- 

```
       ]*

```

- 

```
     }*
  }
}

```

}

So the question can that do the work and is that an optimal solution (I  
need to support several languages) for the problem.

Thanks!!!  
Sasha

On Wednesday, December 4, 2013 12:28:21 PM UTC+2, David Pilato wrote:

> english tokenizer does not exist.  
> english analyzer uses a standard tokenizer.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 4 décembre 2013 at 10:59:08, Sasha Ostrikov ([alexander...@gmail.com](mailto:alexander...@gmail.com)\<javascript:\>)  
> a écrit:
> 
> Sure, so this is my configuration (using Sense plugin for chrome):  
> POST \_template/temp1  
> {  
> "template": "_",  
> "order": "5",  
> "settings": {  
> "index": {  
> "analysis": {  
> "filter": {  
> "word\_delimiter\_filter": {  
> "type": "word\_delimiter",  
> "generate\_word\_parts": false,  
> "catenate\_words": true,  
> "split\_on\_numerics": false,  
> "preserve\_original": true,  
> "type\_table": [  
> "# =\> ALPHA",  
> "@ =\> ALPHA",  
> "% =\> ALPHA",  
> "$ =\> ALPHA",  
> "% =\> ALPHA"  
> ]  
> },  
> "stop\_english": {  
> "type": "stop",  
> "stopwords": [  
> "english"  
> ]  
> },  
> "english\_stemmer": {  
> "type": "stemmer",  
> "name": "english"  
> }  
> },  
> "analyzer": {  
> "english": { //HERE I'M TRYING TO OVERRIDE THE BUILT IN  
> english ANALYZER  
> "filter": [  
> "word\_delimiter\_filter"  
> ]  
> },  
> "english2": { //HERE I'M TRYING TO CONFIG MY OWN english  
> ANALYZER THAT WOULD BEHAVE LIKE THE BUILT IN  
> "type": "custom",  
> "tokenizer": "english",  
> "filter": [  
> "lowercase",  
> "word\_delimiter\_filter",  
> "english\_stemmer",  
> "stop\_english"  
> ]  
> }  
> }  
> }  
> }  
> },  
> "mappings": {  
> "default": {  
> "dynamic\_templates": [  
> {  
> "template\_textEnglish": {  
> "match": "text.English._",  
> "mapping": {  
> "type": "string",  
> "store": "yes",  
> "index": "analyzed",  
> "analyzer": "english",  
> "term\_vector": "with\_positions\_offsets"  
> }  
> }  
> },  
> {  
> "template\_textEnglish": {  
> "match": "text.English2.\*",  
> "mapping": {  
> "type": "string",  
> "store": "yes",  
> "index": "analyzed",  
> "analyzer": "english2",  
> "term\_vector": "with\_positions\_offsets"  
> }  
> }  
> }  
> ]  
> }  
> }  
> }
> 
> and this is the error I get trying to create a new index:  
> {  
> "error": "IndexCreationException[[test1] failed to create index];  
> nested: ElasticSearchIllegalArgumentException[failed to find analyzer type  
> [null] or tokenizer for [english]]; ",  
> "status": 400  
> }
> 
> On Tuesday, December 3, 2013 10:42:41 PM UTC+2, Kurt Hurtado wrote:
> 
> > Hi Sasha,  
> > Would you mind posting the full curl commands or some other  
> > representation of the settings and mappings you're creating?  
> > Thanks!
> > 
> > On Tuesday, December 3, 2013 12:05:21 PM UTC-8, Sasha Ostrikov wrote:
> > 
> > > Hello friends,
> > > 
> > > I'm trying to preserve specific characters during tokenization using  
> > > word\_delimiter filter by defining the type\_table (as described in  
> > > [The domain name Fullscale.co is for sale | Dan.com](http://www.fullscale.co/blog/2013/03/04/preserving_specific_characters_during_tokenizing_in_elasticsearch.html)  
> > > ).  
> > > Actually my idea is to override the built-in English analyzer by  
> > > including custom configured "word\_delimiter" ("type\_table": ["# =\> ALPHA",  
> > > "@ =\> ALPHA"]) filter, but I cannot find any way to do it.  
> > > I also tried to create a custom english analyzer but still getting next  
> > > problems:
> > > 
> > > 1. I don't actually know the default settings of the built-in english  
> > > analyzer (But I really want to preserve it)
> > > 2. While trying to set "tokenizer": english getting an error on creating  
> > > index, saying that english tokenizer is not found.  
> > > I'm using 0.90.5 ES
> > > 
> > > Hope for your kind help!  
> > > Sasha
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a4f7be8f-d5e4-453a-ac0d-1406ff8c69b3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a4f7be8f-d5e4-453a-ac0d-1406ff8c69b3%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![sashao](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@sashao](https://discuss.elastic.co/u/sashao)\
**Post date:** [December 4, 2013, 12:46pm UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688/6 "2013-12-04T12:46:56Z")

</div>

David, thanks for your answer!  
So, I"ll try to sum up the things untill this point:

1. My general purpose is to preserve specific characters during  
tokenization, so if someone searchs for "25$" he will find docs with 25$  
only and not docs with other occurrences of 25.
2. To do it I thought to customize the "word\_delimiter" filter in with  
custom "type\_table": ["$ =\> ALPHA"].
3. Now I need to include this filter into analyzer definition, so I thought  
about two options:  
a. override the built in "english" analizer - I'm not sure how do it and  
if that's possible at all, but that would probably most convinient solution  
for the specific problem.  
b. create custom english analyzer - the problem, I'm not sure what is the  
right filters list to put there to\* preserve the built-in english tokenizer  
behaviour.\*  
So untill this point and using David's comment, I thought about  
following definition:  
"settings": {  
"index": {  
"analysis": {  
"filter": {  
"custom\_word\_delimiter": {  
"type": "word\_delimiter",  
"generate\_word\_parts": false,  
"catenate\_words": true,  
"split\_on\_numerics": false,  
"preserve\_original": true,  
"type\_table": ["# =\> ALPHA"]  
},  
"stop\_english": {  
"type": "stop",  
"stopwords": [  
"_english_"  
]  
},  
"english\_stemmer": {  
"type": "stemmer",  
"name": "english"  
}  
},
  - "analyzer": {\*

- 

```
     "my_custom_english": {*

```

- 

```
       "type": "custom",*

```

- 

```
       "tokenizer": "standard",*

```

- 

```
       "filter": [*

```

- 

```
         "lowercase",*

```

- 

```
         "custom_word_delimiter",*

```

- 

```
         "english_stemmer",*

```

- 

```
         "stop_english"*

```

- 

```
       ]*

```

- 

```
     }*
  }
}

```

}

So the question can that do the work and is that an optimal solution (I  
need to support several languages) for the problem.

Thanks!!!  
Sasha

On Wednesday, December 4, 2013 12:28:21 PM UTC+2, David Pilato wrote:

> english tokenizer does not exist.  
> english analyzer uses a standard tokenizer.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 4 décembre 2013 at 10:59:08, Sasha Ostrikov ([alexander...@gmail.com](mailto:alexander...@gmail.com)\<javascript:\>)  
> a écrit:
> 
> Sure, so this is my configuration (using Sense plugin for chrome):  
> POST \_template/temp1  
> {  
> "template": "_",  
> "order": "5",  
> "settings": {  
> "index": {  
> "analysis": {  
> "filter": {  
> "word\_delimiter\_filter": {  
> "type": "word\_delimiter",  
> "generate\_word\_parts": false,  
> "catenate\_words": true,  
> "split\_on\_numerics": false,  
> "preserve\_original": true,  
> "type\_table": [  
> "# =\> ALPHA",  
> "@ =\> ALPHA",  
> "% =\> ALPHA",  
> "$ =\> ALPHA",  
> "% =\> ALPHA"  
> ]  
> },  
> "stop\_english": {  
> "type": "stop",  
> "stopwords": [  
> "english"  
> ]  
> },  
> "english\_stemmer": {  
> "type": "stemmer",  
> "name": "english"  
> }  
> },  
> "analyzer": {  
> "english": { //HERE I'M TRYING TO OVERRIDE THE BUILT IN  
> english ANALYZER  
> "filter": [  
> "word\_delimiter\_filter"  
> ]  
> },  
> "english2": { //HERE I'M TRYING TO CONFIG MY OWN english  
> ANALYZER THAT WOULD BEHAVE LIKE THE BUILT IN  
> "type": "custom",  
> "tokenizer": "english",  
> "filter": [  
> "lowercase",  
> "word\_delimiter\_filter",  
> "english\_stemmer",  
> "stop\_english"  
> ]  
> }  
> }  
> }  
> }  
> },  
> "mappings": {  
> "default": {  
> "dynamic\_templates": [  
> {  
> "template\_textEnglish": {  
> "match": "text.English._",  
> "mapping": {  
> "type": "string",  
> "store": "yes",  
> "index": "analyzed",  
> "analyzer": "english",  
> "term\_vector": "with\_positions\_offsets"  
> }  
> }  
> },  
> {  
> "template\_textEnglish": {  
> "match": "text.English2.\*",  
> "mapping": {  
> "type": "string",  
> "store": "yes",  
> "index": "analyzed",  
> "analyzer": "english2",  
> "term\_vector": "with\_positions\_offsets"  
> }  
> }  
> }  
> ]  
> }  
> }  
> }
> 
> and this is the error I get trying to create a new index:  
> {  
> "error": "IndexCreationException[[test1] failed to create index];  
> nested: ElasticSearchIllegalArgumentException[failed to find analyzer type  
> [null] or tokenizer for [english]]; ",  
> "status": 400  
> }
> 
> On Tuesday, December 3, 2013 10:42:41 PM UTC+2, Kurt Hurtado wrote:
> 
> > Hi Sasha,  
> > Would you mind posting the full curl commands or some other  
> > representation of the settings and mappings you're creating?  
> > Thanks!
> > 
> > On Tuesday, December 3, 2013 12:05:21 PM UTC-8, Sasha Ostrikov wrote:
> > 
> > > Hello friends,
> > > 
> > > I'm trying to preserve specific characters during tokenization using  
> > > word\_delimiter filter by defining the type\_table (as described in  
> > > [The domain name Fullscale.co is for sale | Dan.com](http://www.fullscale.co/blog/2013/03/04/preserving_specific_characters_during_tokenizing_in_elasticsearch.html)  
> > > ).  
> > > Actually my idea is to override the built-in English analyzer by  
> > > including custom configured "word\_delimiter" ("type\_table": ["# =\> ALPHA",  
> > > "@ =\> ALPHA"]) filter, but I cannot find any way to do it.  
> > > I also tried to create a custom english analyzer but still getting next  
> > > problems:
> > > 
> > > 1. I don't actually know the default settings of the built-in english  
> > > analyzer (But I really want to preserve it)
> > > 2. While trying to set "tokenizer": english getting an error on creating  
> > > index, saying that english tokenizer is not found.  
> > > I'm using 0.90.5 ES
> > > 
> > > Hope for your kind help!  
> > > Sasha
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8cbc14ec-abf9-48b0-84f5-c4f3b9d1060e%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cde0ffeb-9452-4ffd-ba95-b40f18c2533c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cde0ffeb-9452-4ffd-ba95-b40f18c2533c%40googlegroups.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:03am UTC](https://discuss.elastic.co/t/override-built-in-analyzer/14688/7 "2017-07-06T02:03:19Z")

</div>


