# Issue when indexing french words with ^

**URL:** <https://discuss.elastic.co/t/issue-when-indexing-french-words-with/5278>\
**Category:** Elasticsearch\
**Created:** [August 30, 2011, 10:17am UTC](https://discuss.elastic.co/t/issue-when-indexing-french-words-with/5278 "2011-08-30T10:17:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Heimburger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_heimburger/32/2941_2.png) [@Alexandre\_Heimburger](https://discuss.elastic.co/u/Alexandre_Heimburger)\
**Post date:** [August 30, 2011, 10:17am UTC](https://discuss.elastic.co/t/issue-when-indexing-french-words-with/5278/1 "2011-08-30T10:17:20Z")

</div>

Hey

I gist my configuration and query.

> <https://gist.github.com/alheim/211d97b1d7cd3eb1aeac>

_The context_

I use a stemmer-ngram filter to index the title field of my documents. (It  
enables me to implement a super fast autocompletion btw).

I works great with french words containing é, è (i.e I can search  
_theorie_to find documents indexed with  
_théorie_).

But it does not work with french words containing ^.

I index the title "Pôle web 2.0" which I cannot find using "pole" term.

It seems that the n-gram tokenizer does not recognize ^ as an accent.

Any idea ?

-Alex-

---

<div class="post-metadata">

**Author:** ![Alexandre\_Heimburger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_heimburger/32/2941_2.png) [@Alexandre\_Heimburger](https://discuss.elastic.co/u/Alexandre_Heimburger)\
**Post date:** [August 31, 2011, 12:15pm UTC](https://discuss.elastic.co/t/issue-when-indexing-french-words-with/5278/2 "2011-08-31T12:15:02Z")

</div>

No idea everybody ?

On 30 août, 12:17, Alexandre Heimburger [alexheimbur...@gmail.com](mailto:alexheimbur...@gmail.com)  
wrote:

> Hey
> 
> I gist my configuration and query.
> 
> [Ngram indexation of french words containing ^ · GitHub](https://gist.github.com/211d97b1d7cd3eb1aeac)
> 
> _The context_
> 
> I use a stemmer-ngram filter to index the title field of my documents. (It  
> enables me to implement a super fast autocompletion btw).
> 
> I works great with french words containing é, è (i.e I can search  
> _theorie_to find documents indexed with  
> _théorie_).
> 
> But it does not work with french words containing ^.
> 
> I index the title "Pôle web 2.0" which I cannot find using "pole" term.
> 
> It seems that the n-gram tokenizer does not recognize ^ as an accent.
> 
> Any idea ?
> 
> -Alex-

---

<div class="post-metadata">

**Author:** ![Tomislav\_Poljak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomislav_poljak/32/1177_2.png) [@Tomislav\_Poljak](https://discuss.elastic.co/u/Tomislav_Poljak)\
**Post date:** [August 31, 2011, 2:42pm UTC](https://discuss.elastic.co/t/issue-when-indexing-french-words-with/5278/3 "2011-08-31T14:42:46Z")

</div>

Hi,  
I don't think n-gram tokenizer strips any accents. You need to use  
ASCII Folding Token Filter  
([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/asciifolding-tokenfilter.html))  
for this, at both index and query time analysis. I've altered your AC  
analysis (added "asciifolding" filter at both index and query time  
analysis), check [stripping accents in auto-complete analysis · GitHub](https://gist.github.com/1183687) -\> I've tested with  
"query": "pole" and it matches.

Hope this helps,

Tomislav

2011/8/31 alheim [alexheimburger@gmail.com](mailto:alexheimburger@gmail.com):

> No idea everybody ?
> 
> On 30 août, 12:17, Alexandre Heimburger [alexheimbur...@gmail.com](mailto:alexheimbur...@gmail.com)  
> wrote:
> 
> > Hey
> > 
> > I gist my configuration and query.
> > 
> > [Ngram indexation of french words containing ^ · GitHub](https://gist.github.com/211d97b1d7cd3eb1aeac)
> > 
> > _The context_
> > 
> > I use a stemmer-ngram filter to index the title field of my documents. (It  
> > enables me to implement a super fast autocompletion btw).
> > 
> > I works great with french words containing é, è (i.e I can search  
> > _theorie_to find documents indexed with  
> > _théorie_).
> > 
> > But it does not work with french words containing ^.
> > 
> > I index the title "Pôle web 2.0" which I cannot find using "pole" term.
> > 
> > It seems that the n-gram tokenizer does not recognize ^ as an accent.
> > 
> > Any idea ?
> > 
> > -Alex-

---

<div class="post-metadata">

**Author:** ![Alexandre\_Heimburger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_heimburger/32/2941_2.png) [@Alexandre\_Heimburger](https://discuss.elastic.co/u/Alexandre_Heimburger)\
**Post date:** [August 31, 2011, 4:15pm UTC](https://discuss.elastic.co/t/issue-when-indexing-french-words-with/5278/4 "2011-08-31T16:15:59Z")

</div>

Thanks a lot. I test tomorrow morning and I'll tell you.

On Wed, Aug 31, 2011 at 4:42 PM, Tomislav Poljak [tpoljak@gmail.com](mailto:tpoljak@gmail.com) wrote:

> Hi,  
> I don't think n-gram tokenizer strips any accents. You need to use  
> ASCII Folding Token Filter  
> (  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/asciifolding-tokenfilter.html)  
> )  
> for this, at both index and query time analysis. I've altered your AC  
> analysis (added "asciifolding" filter at both index and query time  
> analysis), check [stripping accents in auto-complete analysis · GitHub](https://gist.github.com/1183687) -\> I've tested with  
> "query": "pole" and it matches.
> 
> Hope this helps,
> 
> Tomislav
> 
> 2011/8/31 alheim [alexheimburger@gmail.com](mailto:alexheimburger@gmail.com):
> 
> > No idea everybody ?
> > 
> > On 30 août, 12:17, Alexandre Heimburger [alexheimbur...@gmail.com](mailto:alexheimbur...@gmail.com)  
> > wrote:
> > 
> > > Hey
> > > 
> > > I gist my configuration and query.
> > > 
> > > [Ngram indexation of french words containing ^ · GitHub](https://gist.github.com/211d97b1d7cd3eb1aeac)
> > > 
> > > _The context_
> > > 
> > > I use a stemmer-ngram filter to index the title field of my documents.  
> > > (It  
> > > enables me to implement a super fast autocompletion btw).
> > > 
> > > I works great with french words containing é, è (i.e I can search  
> > > _theorie_to find documents indexed with  
> > > _théorie_).
> > > 
> > > But it does not work with french words containing ^.
> > > 
> > > I index the title "Pôle web 2.0" which I cannot find using "pole" term.
> > > 
> > > It seems that the n-gram tokenizer does not recognize ^ as an accent.
> > > 
> > > Any idea ?
> > > 
> > > -Alex-

--  
Alexandre Heimburger  
R&D Manager  
blueKiwi Software  
tel : +33687880997  
email : [ahb@bluekiwi-software.com](mailto:ahb@bluekiwi-software.com)  
adress : 93 rue Vieille du Temple, 75003 Paris

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in  
the world building professional networks on conversations and relationships

- helps large organizations increase their productivity, foster innovations  
and boost people satisfaction.

---

<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:55am UTC](https://discuss.elastic.co/t/issue-when-indexing-french-words-with/5278/5 "2017-07-06T03:55:24Z")

</div>


