# How to use search\_as\_you\_type datatype with multiple languages? Best practice/experiences

**URL:** <https://discuss.elastic.co/t/how-to-use-search-as-you-type-datatype-with-multiple-languages-best-practice-experiences/237153>\
**Category:** Elasticsearch\
**Created:** [June 15, 2020, 2:31pm UTC](https://discuss.elastic.co/t/how-to-use-search-as-you-type-datatype-with-multiple-languages-best-practice-experiences/237153 "2020-06-15T14:31:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![as\_ES](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@as\_ES](https://discuss.elastic.co/u/as_ES)\
**Post date:** [June 15, 2020, 2:31pm UTC](https://discuss.elastic.co/t/how-to-use-search-as-you-type-datatype-with-multiple-languages-best-practice-experiences/237153/1 "2020-06-15T14:31:56Z")

</div>

Hi,

how does one handle the combination of search\_as\_you\_type dataytpe and fields in multiple languages? Or is it not applicable in such a use-case?

For Example:  
An index of books has a field **book\_title** and **alternative\_titles**.  
One of the books is _Harry Potter and the Philosopher’s Stone_

**book\_title** :  
_Harry Potter and the Philosopher’s Stone_  
**alternative\_titles** :  
_Harry Potter and the Sorcerer’s Stone_  
_Harry Potter à l'école des sorciers_  
_Harry Potter und der Stein der Weisen_  
_Harry Potter e la pietra filosofale_  
...

As far as I understand there are 3 options to handle multiple languages:

1. One Index for each language
2. Multi-field for each language
3. Separate fields for each language

Problems with Case 1: How to stop the book from showing up multiple times in the search result, if the search language is not known before?

Problems with 2 and 3: How is the performance of the search affected? Because each search\_as\_you\_type field generates more analyzed fields.

Question:  
What kind of mapping is needed in such a use case?

Thankful for any input

---

<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 13, 2020, 2:31pm UTC](https://discuss.elastic.co/t/how-to-use-search-as-you-type-datatype-with-multiple-languages-best-practice-experiences/237153/2 "2020-07-13T14:31:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
