# Determine diacritics sensitivity at query time

**URL:** <https://discuss.elastic.co/t/determine-diacritics-sensitivity-at-query-time/5965>\
**Category:** Elasticsearch\
**Created:** [November 24, 2011, 4:09pm UTC](https://discuss.elastic.co/t/determine-diacritics-sensitivity-at-query-time/5965 "2011-11-24T16:09:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sisu\_Alexandru](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Sisu\_Alexandru](https://discuss.elastic.co/u/Sisu_Alexandru)\
**Post date:** [November 24, 2011, 4:09pm UTC](https://discuss.elastic.co/t/determine-diacritics-sensitivity-at-query-time/5965/1 "2011-11-24T16:09:15Z")

</div>

Hi,

What would be the best solution for the following problem?

Assuming that I have 2 documents like:  
doc1. "word1 électricité word3"  
doc2. "word2 electricite word3"

I would like to provide general, and also specific search.  
General search:

search for : "électricité -\> [doc1, doc2]  
search for: "electricite" -\> [doc1, doc2]  
(thats easy: I'm asciifolding and I'm also keeping the original  
terms).

Diacritic sensitiv search:  
search for: "électricité" -\> [doc1]  
search for:"electricite" -\> [doc2]

How can I offer both?

The obvious solution would be to add some duplicate fields in the  
docs, but for large amounts of documents that will not work (\>200 GB),  
because the size of the indexes will get increased.

Does anybody else encountered this problems? What were the solutions  
that you found?

Tnx,

Alex

---

<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:** [November 24, 2011, 6:32pm UTC](https://discuss.elastic.co/t/determine-diacritics-sensitivity-at-query-time/5965/2 "2011-11-24T18:32:08Z")

</div>

If its on a specific field, you can use multi field mapping, one with ascii  
folding, and one without, and pick and choose which one to query.

On Thu, Nov 24, 2011 at 6:09 PM, alex [sisu.eugen@gmail.com](mailto:sisu.eugen@gmail.com) wrote:

> Hi,
> 
> What would be the best solution for the following problem?
> 
> Assuming that I have 2 documents like:  
> doc1. "word1 électricité word3"  
> doc2. "word2 electricite word3"
> 
> I would like to provide general, and also specific search.  
> General search:
> 
> search for : "électricité -\> [doc1, doc2]  
> search for: "electricite" -\> [doc1, doc2]  
> (thats easy: I'm asciifolding and I'm also keeping the original  
> terms).
> 
> Diacritic sensitiv search:  
> search for: "électricité" -\> [doc1]  
> search for:"electricite" -\> [doc2]
> 
> How can I offer both?
> 
> The obvious solution would be to add some duplicate fields in the  
> docs, but for large amounts of documents that will not work (\>200 GB),  
> because the size of the indexes will get increased.
> 
> Does anybody else encountered this problems? What were the solutions  
> that you found?
> 
> Tnx,
> 
> Alex

---

<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:47am UTC](https://discuss.elastic.co/t/determine-diacritics-sensitivity-at-query-time/5965/3 "2017-07-06T03:47:33Z")

</div>


