# Asciifolding analyzer

**URL:** <https://discuss.elastic.co/t/asciifolding-analyzer/4981>\
**Category:** Elasticsearch\
**Created:** [July 27, 2011, 10:22pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981 "2011-07-27T22:22:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Eduardo\_da\_Fo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_eduardo_da_fo/32/3112_2.png) [@Carlos\_Eduardo\_da\_Fo](https://discuss.elastic.co/u/Carlos_Eduardo_da_Fo)\
**Post date:** [July 27, 2011, 10:22pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/1 "2011-07-27T22:22:11Z")

</div>

Hi, I've done a lot of research on groups and ES guides on how to use this  
analyzer but somehow it is not working.

Here's my elasticsearch.yml:

index:  
analysis:  
analyzer:  
standard:  
tokenizer: standard  
type: standard  
filter: [standard, lowercase, stop, asciifolding]

I based this link  
[http://www.elasticsearch.org/guide/reference/index-modules/analysis/](http://www.elasticsearch.org/guide/reference/index-modules/analysis/) -  
aliasing section

I already stopped ES, removed the data/ dir and indexed everything after  
changing the file. Still not working.

My ES version is 1.17.0

What may be wrong?

Thanks,

--  
Carlos Eduardo da Fonseca

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 28, 2011, 12:53pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/2 "2011-07-28T12:53:50Z")

</div>

You change the standard analyzer, this means that in the mapping, if you set  
for a field explicitly to use the standard analyzer (set  
analyzer="standard") then it will use it.

If you want to change the _default_ analyzer, then replace the name standard  
with default.

On Thu, Jul 28, 2011 at 1:22 AM, Carlos Eduardo da Fonseca \<  
[eduardongu@gmail.com](mailto:eduardongu@gmail.com)\> wrote:

> Hi, I've done a lot of research on groups and ES guides on how to use this  
> analyzer but somehow it is not working.
> 
> Here's my elasticsearch.yml:
> 
> index:  
> analysis:  
> analyzer:  
> standard:  
> tokenizer: standard  
> type: standard  
> filter: [standard, lowercase, stop, asciifolding]
> 
> I based this link  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/) -  
> aliasing section
> 
> I already stopped ES, removed the data/ dir and indexed everything after  
> changing the file. Still not working.
> 
> My ES version is 1.17.0
> 
> What may be wrong?
> 
> Thanks,
> 
> --  
> Carlos Eduardo da Fonseca

---

<div class="post-metadata">

**Author:** ![Carlos\_Eduardo\_da\_Fo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_eduardo_da_fo/32/3112_2.png) [@Carlos\_Eduardo\_da\_Fo](https://discuss.elastic.co/u/Carlos_Eduardo_da_Fo)\
**Post date:** [July 28, 2011, 1:09pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/3 "2011-07-28T13:09:06Z")

</div>

Hi Shay, thanks for the answer.

I changed it to "default", restarted ES (cleaning data/) and reindexed, but  
it doesn't worked...

elasticsearch.yml:

index:  
analysis:  
analyzer:  
default:  
tokenizer: standard  
type: standard  
filter: [standard, lowercase, stop, asciifolding]

On Thu, Jul 28, 2011 at 9:53 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> You change the standard analyzer, this means that in the mapping, if you  
> set for a field explicitly to use the standard analyzer (set  
> analyzer="standard") then it will use it.
> 
> If you want to change the _default_ analyzer, then replace the name  
> standard with default.
> 
> On Thu, Jul 28, 2011 at 1:22 AM, Carlos Eduardo da Fonseca \<  
> [eduardongu@gmail.com](mailto:eduardongu@gmail.com)\> wrote:
> 
> > Hi, I've done a lot of research on groups and ES guides on how to use this  
> > analyzer but somehow it is not working.
> > 
> > Here's my elasticsearch.yml:
> > 
> > index:  
> > analysis:  
> > analyzer:  
> > standard:  
> > tokenizer: standard  
> > type: standard  
> > filter: [standard, lowercase, stop, asciifolding]
> > 
> > I based this link  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/) -  
> > aliasing section
> > 
> > I already stopped ES, removed the data/ dir and indexed everything after  
> > changing the file. Still not working.
> > 
> > My ES version is 1.17.0
> > 
> > What may be wrong?
> > 
> > Thanks,
> > 
> > --  
> > Carlos Eduardo da Fonseca

--  
Carlos Eduardo da Fonseca

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 28, 2011, 1:36pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/4 "2011-07-28T13:36:08Z")

</div>

Gist an example then of why it does not work. One way to make sure it has  
taked affect on indices created is to issue get settings and see if its  
there.

On Thu, Jul 28, 2011 at 4:09 PM, Carlos Eduardo da Fonseca \<  
[eduardongu@gmail.com](mailto:eduardongu@gmail.com)\> wrote:

> Hi Shay, thanks for the answer.
> 
> I changed it to "default", restarted ES (cleaning data/) and reindexed, but  
> it doesn't worked...
> 
> elasticsearch.yml:
> 
> index:  
> analysis:  
> analyzer:  
> default:  
> tokenizer: standard  
> type: standard  
> filter: [standard, lowercase, stop, asciifolding]
> 
> On Thu, Jul 28, 2011 at 9:53 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > You change the standard analyzer, this means that in the mapping, if you  
> > set for a field explicitly to use the standard analyzer (set  
> > analyzer="standard") then it will use it.
> > 
> > If you want to change the _default_ analyzer, then replace the name  
> > standard with default.
> > 
> > On Thu, Jul 28, 2011 at 1:22 AM, Carlos Eduardo da Fonseca \<  
> > [eduardongu@gmail.com](mailto:eduardongu@gmail.com)\> wrote:
> > 
> > > Hi, I've done a lot of research on groups and ES guides on how to use  
> > > this analyzer but somehow it is not working.
> > > 
> > > Here's my elasticsearch.yml:
> > > 
> > > index:  
> > > analysis:  
> > > analyzer:  
> > > standard:  
> > > tokenizer: standard  
> > > type: standard  
> > > filter: [standard, lowercase, stop, asciifolding]
> > > 
> > > I based this link  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/) -  
> > > aliasing section
> > > 
> > > I already stopped ES, removed the data/ dir and indexed everything after  
> > > changing the file. Still not working.
> > > 
> > > My ES version is 1.17.0
> > > 
> > > What may be wrong?
> > > 
> > > Thanks,
> > > 
> > > --  
> > > Carlos Eduardo da Fonseca
> 
> --  
> Carlos Eduardo da Fonseca

---

<div class="post-metadata">

**Author:** ![Carlos\_Eduardo\_da\_Fo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_eduardo_da_fo/32/3112_2.png) [@Carlos\_Eduardo\_da\_Fo](https://discuss.elastic.co/u/Carlos_Eduardo_da_Fo)\
**Post date:** [July 28, 2011, 2:33pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/5 "2011-07-28T14:33:17Z")

</div>

Ok, here's a gist with index settings and everything I did after creating  
the index with settings via PUT:

> <https://gist.github.com/cedufca/1a92fe00ddbd71806892>

---

<div class="post-metadata">

**Author:** ![Vladimir\_Shkurin](https://avatars.discourse-cdn.com/v4/letter/v/94ad74/32.png) [@Vladimir\_Shkurin](https://discuss.elastic.co/u/Vladimir_Shkurin)\
**Post date:** [July 28, 2011, 7:41pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/6 "2011-07-28T19:41:46Z")

</div>

I'm using this settings and asciifolding works:

> <https://gist.github.com/vshkurin/1109136>

/\_search?q=title:botao\* - OK  
/\_search?q=botao\* - OK

You can remove the "my\_delimiter", "porter\_stem" and use these  
settings, just write in your mappings for field-type "string" for  
"index\_analyzer" and "search\_analyzer" your custom analyzer.

---

<div class="post-metadata">

**Author:** ![Carlos\_Eduardo\_da\_Fo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_eduardo_da_fo/32/3112_2.png) [@Carlos\_Eduardo\_da\_Fo](https://discuss.elastic.co/u/Carlos_Eduardo_da_Fo)\
**Post date:** [July 28, 2011, 8:57pm UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/7 "2011-07-28T20:57:43Z")

</div>

That worked! thanks a lot!!!

On Thu, Jul 28, 2011 at 4:41 PM, Vladimir Shkurin [vshkurin@gmail.com](mailto:vshkurin@gmail.com)wrote:

> I'm using this settings and asciifolding works:
> 
> [ElasticSearch Test Queries · GitHub](https://gist.github.com/1109136)
> 
> /\_search?q=title:botao\* - OK  
> /\_search?q=botao\* - OK
> 
> You can remove the "my\_delimiter", "porter\_stem" and use these  
> settings, just write in your mappings for field-type "string" for  
> "index\_analyzer" and "search\_analyzer" your custom analyzer.

--  
Carlos Eduardo da Fonseca

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 29, 2011, 6:37am UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/8 "2011-07-29T06:37:22Z")

</div>

Strange that it worked :). By default, wildcard and prefix using the  
query\_string query (which is what q= is translated to) don't get analyzed.  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html).  
You can pass analyze\_wildcard set to true, which will cause wildcards to be  
analyzed as well (though its tricky).

Having said that, the analyze\_wildcard parameter is not exposed when using  
?q=..., though it can be added easily, something like:  
?q=analyze\_wildcard=true&q=... .

Most times, a better option is to use the text family of queries:  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/text-query.html).

On Thu, Jul 28, 2011 at 11:57 PM, Carlos Eduardo da Fonseca \<  
[eduardongu@gmail.com](mailto:eduardongu@gmail.com)\> wrote:

> That worked! thanks a lot!!!
> 
> On Thu, Jul 28, 2011 at 4:41 PM, Vladimir Shkurin [vshkurin@gmail.com](mailto:vshkurin@gmail.com)wrote:
> 
> > I'm using this settings and asciifolding works:
> > 
> > [ElasticSearch Test Queries · GitHub](https://gist.github.com/1109136)
> > 
> > /\_search?q=title:botao\* - OK  
> > /\_search?q=botao\* - OK
> > 
> > You can remove the "my\_delimiter", "porter\_stem" and use these  
> > settings, just write in your mappings for field-type "string" for  
> > "index\_analyzer" and "search\_analyzer" your custom analyzer.
> 
> --  
> Carlos Eduardo da Fonseca

---

<div class="post-metadata">

**Author:** ![Carlos\_Eduardo\_da\_Fo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_eduardo_da_fo/32/3112_2.png) [@Carlos\_Eduardo\_da\_Fo](https://discuss.elastic.co/u/Carlos_Eduardo_da_Fo)\
**Post date:** [July 29, 2011, 11:41am UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/9 "2011-07-29T11:41:12Z")

</div>

Shay, I searched using text and field queries, forgot to mention. I think it  
wasn't working before because of missing mappings...

On Fri, Jul 29, 2011 at 3:37 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Strange that it worked :). By default, wildcard and prefix using the  
> query\_string query (which is what q= is translated to) don't get analyzed.  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html).  
> You can pass analyze\_wildcard set to true, which will cause wildcards to be  
> analyzed as well (though its tricky).
> 
> Having said that, the analyze\_wildcard parameter is not exposed when using  
> ?q=..., though it can be added easily, something like:  
> ?q=analyze\_wildcard=true&q=... .
> 
> Most times, a better option is to use the text family of queries:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/text-query.html).
> 
> On Thu, Jul 28, 2011 at 11:57 PM, Carlos Eduardo da Fonseca \<  
> [eduardongu@gmail.com](mailto:eduardongu@gmail.com)\> wrote:
> 
> > That worked! thanks a lot!!!
> > 
> > On Thu, Jul 28, 2011 at 4:41 PM, Vladimir Shkurin [vshkurin@gmail.com](mailto:vshkurin@gmail.com)wrote:
> > 
> > > I'm using this settings and asciifolding works:
> > > 
> > > [ElasticSearch Test Queries · GitHub](https://gist.github.com/1109136)
> > > 
> > > /\_search?q=title:botao\* - OK  
> > > /\_search?q=botao\* - OK
> > > 
> > > You can remove the "my\_delimiter", "porter\_stem" and use these  
> > > settings, just write in your mappings for field-type "string" for  
> > > "index\_analyzer" and "search\_analyzer" your custom analyzer.
> > 
> > --  
> > Carlos Eduardo da Fonseca

--  
Carlos Eduardo da Fonseca

---

<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, 3:58am UTC](https://discuss.elastic.co/t/asciifolding-analyzer/4981/10 "2017-07-06T03:58:52Z")

</div>


