# Multiple Languages against single attribute

**URL:** <https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199>\
**Category:** Elasticsearch\
**Created:** [August 16, 2016, 10:48pm UTC](https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199 "2016-08-16T22:48:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Post date:** [August 16, 2016, 10:48pm UTC](https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199/1 "2016-08-16T22:48:15Z")

</div>

Is there a possibility to index the content supporting different languages against same attribute (or) should I create individual attributes with different language analyzer? What is the best practice!

I'm not getting right reference

URL referred in below discussion is not working

> [@Multilingual index options: \_analyzer or multiple mappings or?](https://discuss.elastic.co/t/multilingual-index-options--analyzer-or-multiple-mappings-or/6382):
>
> Hi, What's the best way to handle an index with multilingual docs (e.g., 1 lang per doc, but not all docs in the same language)? Is explicitly specifying the language-specific analyzer via \_analyzer for each field at index time the best approach? See [http://www.elasticsearch.org/guide/reference/mapping/analyzer-field.html](http://www.elasticsearch.org/guide/reference/mapping/analyzer-field.html) Or would this work better: curl -XPOST localhost:9200/test -d '{ "mappings" : { "english" : { "properties" : { "title" : { "type" : "string", "index" : "analyzed" }, …

Not able to find example in

> **[Index API | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html)**

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 17, 2016, 4:04am UTC](https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199/2 "2016-08-17T04:04:33Z")

</div>

Take a look at [https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-types.html#\_multi\_fields](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-types.html#_multi_fields)

---

<div class="post-metadata">

**Author:** ![Karthik\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Post date:** [August 17, 2016, 7:01am UTC](https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199/3 "2016-08-17T07:01:27Z")

</div>

THanks Mark.

We are using fields for attribute where we also have non\_analyzed representation.

But if I go with the approach for analyzed content won't I add more indexing pressure/document given the case is each document represent only only language. Unnecessarily I will be indexing the same content against multiple fields with different analyzers. I was thinking of having different attributes for each language where the attribute not representing the document language can be ignored.

NOTE: I have many not\_analyzed attributes other than the main content attribute  
I also would avoid creating multiple indice for each language as English represent 80% of the content

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 17, 2016, 7:32am UTC](https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199/4 "2016-08-17T07:32:39Z")

</div>

Ok, so you can use different types then (assuming you have the same field types in all languages), the just apply different templates to those?

---

<div class="post-metadata">

**Author:** ![Karthik\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Post date:** [August 17, 2016, 6:27pm UTC](https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199/5 "2016-08-17T18:27:28Z")

</div>

Thanks Mark. That is a option. But the below references advises to avoid types.  
[https://www.elastic.co/guide/en/elasticsearch/guide/current/one-lang-docs.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/one-lang-docs.html)

In this case, the choice of having multiple field representing each language could do better.  
[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)

Is my understanding correct!

---

<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 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/multiple-languages-against-single-attribute/58199/6 "2017-07-05T22:27:11Z")

</div>


