# Adding asciifolding in default analyzer?

**URL:** <https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277>\
**Category:** Elasticsearch\
**Created:** [August 30, 2010, 7:41pm UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277 "2010-08-30T19:41:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![colinsurprenant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colinsurprenant/32/14776_2.png) [@colinsurprenant](https://discuss.elastic.co/u/colinsurprenant)\
**Post date:** [August 30, 2010, 7:41pm UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/1 "2010-08-30T19:41:40Z")

</div>

Hi,

I am (still) running 0.8 on a production box and I would like to add  
the asciifolding filter. I haven't defined mappings for my index  
(using the default dynamic mapping).

Can I simply add the asciifolding filter to the "default" analyzer like this:

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

I tried it on my dev box but it does not seems to pickup the  
asciifolding filter.

Do I absolutely need to define a custom analyzer and assign it using a  
custom mapping?

Thanks,  
Colin

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [August 30, 2010, 7:51pm UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/2 "2010-08-30T19:51:53Z")

</div>

Hiya

> I am (still) running 0.8 on a production box and I would like to add  
> the asciifolding filter. I haven't defined mappings for my index  
> (using the default dynamic mapping).
> 
> Can I simply add the asciifolding filter to the "default" analyzer like this:
> 
> index :  
> analysis :  
> analyzer :  
> default :  
> tokenizer : standard  
> filter : [standard, lowercase, stop,asciifolding]

Where are you adding this? To config/elasticsearch.yml?

It looks right to me.

Alternatively, you can also add it (minus the first 'index:') when you  
create the index.

> I tried it on my dev box but it does not seems to pickup the  
> asciifolding filter.

Did you create the index before or after adding those settings? It'll  
only affect indices created afterwards.

clint

---

<div class="post-metadata">

**Author:** ![colinsurprenant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colinsurprenant/32/14776_2.png) [@colinsurprenant](https://discuss.elastic.co/u/colinsurprenant)\
**Post date:** [August 30, 2010, 8:16pm UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/3 "2010-08-30T20:16:44Z")

</div>

> Where are you adding this? To config/elasticsearch.yml?

Yup.

> Did you create the index before or after adding those settings? It'll  
> only affect indices created afterwards.

Actually I tried both. I tried after changing the config and  
restarting the node (recovers the index from the gateway), did not  
work, even for data added after the change.  
I also tried after deleting the index using the REST API and I also  
tried after wiping the indices and gateway directories and restarting  
the node.

Thanks,  
Colin

---

<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:** [August 30, 2010, 9:21pm UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/4 "2010-08-30T21:21:11Z")

</div>

The configuration looks good (btw, when you create an index, you still need  
the index "prefix" in the settings provided). I tried it locally and I see  
that it gets added. Can you gist a sample that shows it does not work for  
you?

On Mon, Aug 30, 2010 at 11:16 PM, Colin Surprenant \<  
[colin.surprenant@gmail.com](mailto:colin.surprenant@gmail.com)\> wrote:

> > Where are you adding this? To config/elasticsearch.yml?
> 
> Yup.
> 
> > Did you create the index before or after adding those settings? It'll  
> > only affect indices created afterwards.
> 
> Actually I tried both. I tried after changing the config and  
> restarting the node (recovers the index from the gateway), did not  
> work, even for data added after the change.  
> I also tried after deleting the index using the REST API and I also  
> tried after wiping the indices and gateway directories and restarting  
> the node.
> 
> Thanks,  
> Colin

---

<div class="post-metadata">

**Author:** ![colinsurprenant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colinsurprenant/32/14776_2.png) [@colinsurprenant](https://discuss.elastic.co/u/colinsurprenant)\
**Post date:** [August 31, 2010, 3:57am UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/5 "2010-08-31T03:57:30Z")

</div>

> The configuration looks good (btw, when you create an index, you still need  
> the index "prefix" in the settings provided). I tried it locally and I see  
> that it gets added. Can you gist a sample that shows it does not work for  
> you?

Well, in this case, I am not using the API Create Index. I am just  
starting to directly add documents which triggers the index creation  
on the first item. This is where I am hoping that it will pickup the  
default analyser redefinition in the elasticsearch.yml config.

Is this the problem? Do I absolutely need to use Create Index and pass  
it the analyzer config?

Thanks,  
Colin

---

<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:** [August 31, 2010, 8:15am UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/6 "2010-08-31T08:15:04Z")

</div>

No, you don't need to, the new index gets automatically created for you. Can  
you gist your conf, index creation, and how you check that it was not  
applied (using curl)? I will test it.

On Tue, Aug 31, 2010 at 6:57 AM, Colin Surprenant \<  
[colin.surprenant@gmail.com](mailto:colin.surprenant@gmail.com)\> wrote:

> > The configuration looks good (btw, when you create an index, you still  
> > need  
> > the index "prefix" in the settings provided). I tried it locally and I  
> > see  
> > that it gets added. Can you gist a sample that shows it does not work for  
> > you?
> 
> Well, in this case, I am not using the API Create Index. I am just  
> starting to directly add documents which triggers the index creation  
> on the first item. This is where I am hoping that it will pickup the  
> default analyser redefinition in the elasticsearch.yml config.
> 
> Is this the problem? Do I absolutely need to use Create Index and pass  
> it the analyzer config?
> 
> Thanks,  
> Colin

---

<div class="post-metadata">

**Author:** ![colinsurprenant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colinsurprenant/32/14776_2.png) [@colinsurprenant](https://discuss.elastic.co/u/colinsurprenant)\
**Post date:** [September 1, 2010, 6:37pm UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/7 "2010-09-01T18:37:57Z")

</div>

> No, you don't need to, the new index gets automatically created for you. Can  
> you gist your conf, index creation, and how you check that it was not  
> applied (using curl)? I will test it.

Thanks Shay but no need, I just found the problem. After giving it a  
try on 0.10 I realized my problem was not with the config but with the  
actual encoding in my documents. doh.

So, now, my documents are correctly utf8 encoded and the asciifolding  
filter does work as specified on the default analyzer, as decribed in  
my previous message.

Thanks for your help.  
Colin

---

<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, 4:19am UTC](https://discuss.elastic.co/t/adding-asciifolding-in-default-analyzer/3277/8 "2017-07-06T04:19:56Z")

</div>


