# Bets practice for indexing documents of various languages

**URL:** <https://discuss.elastic.co/t/bets-practice-for-indexing-documents-of-various-languages/90292>\
**Category:** Elasticsearch\
**Created:** [June 21, 2017, 12:55pm UTC](https://discuss.elastic.co/t/bets-practice-for-indexing-documents-of-various-languages/90292 "2017-06-21T12:55:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sliu](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sliu](https://discuss.elastic.co/u/sliu)\
**Post date:** [June 21, 2017, 12:55pm UTC](https://discuss.elastic.co/t/bets-practice-for-indexing-documents-of-various-languages/90292/1 "2017-06-21T12:55:46Z")

</div>

Let's say I have a gift shop index with documents in en, fr, de, cn. Elastic document mentioned two ways of handling this: 1. separate indexes: I'd have giftshop-en, giftshop-fr, giftshop-de, and giftshop-cn four indices. 2. separate searchable fields: I'd have single index giftshop, with separate fields. Let's say I have title, description, price fields, now I'd have title-en, title-fr, ..., description-en, description-fr, ..., plus a single price field.

Note that most documents only have English version, some may have translation of another language.

Questions:

- Which one of the two options is widely used, any preference?
- Is multi-fields ([https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html)) the way to go? It's similar to (2) above. I'd end up having title.en (dot, not dash), [title.fr](http://title.fr), etc. The issue with this approach is, in the mapping I specify title.en with English analyzer, [title.fr](http://title.fr) with French analyzer, etc. and at index time I only send data to "title" field (not "title.en"). It looks like Elastic actually index "title.en", "[title.fr](http://title.fr)", etc automatically. At search time, I have to explicitly query title.en, or [title.fr](http://title.fr), ... In other words, my single language document get processed with all language analyzers I specified (en, fr, de, cjk) -- more indexing time, more disk consumption -- is that correct?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 21, 2017, 1:08pm UTC](https://discuss.elastic.co/t/bets-practice-for-indexing-documents-of-various-languages/90292/2 "2017-06-21T13:08:27Z")

</div>

I'd really read this: [https://www.elastic.co/guide/en/elasticsearch/guide/current/language-pitfalls.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/language-pitfalls.html)

(And the following pages as well)

---

<div class="post-metadata">

**Author:** ![sliu](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sliu](https://discuss.elastic.co/u/sliu)\
**Post date:** [June 21, 2017, 2:02pm UTC](https://discuss.elastic.co/t/bets-practice-for-indexing-documents-of-various-languages/90292/3 "2017-06-21T14:02:34Z")

</div>

Thanks David. I see that [https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html) is better explain on [https://www.elastic.co/guide/en/elasticsearch/guide/current/mixed-lang-fields.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/mixed-lang-fields.html) for language handling, and it's not something for my use case (most documents are single-language).

---

<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 19, 2017, 2:02pm UTC](https://discuss.elastic.co/t/bets-practice-for-indexing-documents-of-various-languages/90292/4 "2017-07-19T14:02:37Z")

</div>

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