# Will this document structure work for multiple language indexing?

**URL:** <https://discuss.elastic.co/t/will-this-document-structure-work-for-multiple-language-indexing/42767>\
**Category:** Elasticsearch\
**Created:** [February 25, 2016, 6:26pm UTC](https://discuss.elastic.co/t/will-this-document-structure-work-for-multiple-language-indexing/42767 "2016-02-25T18:26:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiv\_Naidu](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Shiv\_Naidu](https://discuss.elastic.co/u/Shiv_Naidu)\
**Post date:** [February 25, 2016, 6:26pm UTC](https://discuss.elastic.co/t/will-this-document-structure-work-for-multiple-language-indexing/42767/1 "2016-02-25T18:26:58Z")

</div>

Hi All,

I am trying to create a mapping for my index that requires multiple language support. I found in the documentation there are two ways to do it, "support at the document level" or "field level".

> ```
> {
> "settings": {
> "analysis": {...} 
> },
> "mappings": {
> "title": {
> "properties": {
> "title": {
> "type": "string",
> "fields": {
> "de": {
> "type": "string",
> "analyzer": "german"
> },
> "fr": {
> "type": "string",
> "analyzer": "french"
> }
> }
> },
> "description": {
> "type": "string",
> "fields": {
> "de": {
> "type": "string",
> "analyzer": "german"
> },
> "fr": {
> "type": "string",
> "analyzer": "french"
> }
> }
> }
> }
> }
> }
> }
> 
> ```

Obviously document level support will increase the number of types in the index but it is a cleaner way. Since my requirement is slightly different so I have to choose the field level. But all the examples in the field level gives me something like,

> ```
> {
> "mappings": {
> "title": {
> "properties": {
> "de": {
> "fields": {
> "title": "string",
> "description": "string",
> "analyzer": "german"
> }
> },
> "fr": {
> "fields": {
> "title": "string",
> "description": "string",
> "analyzer": "french"
> }
> }
> }
> }
> }
> }
> 
> ```

I have to try it out but I have a feeling that it is not a supported way. If you have already tried this way please let me know or any thoughts are welcome.

Thanks,  
-Shiv

---

<div class="post-metadata">

**Author:** ![Shiv\_Naidu](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Shiv\_Naidu](https://discuss.elastic.co/u/Shiv_Naidu)\
**Post date:** [February 25, 2016, 7:23pm UTC](https://discuss.elastic.co/t/will-this-document-structure-work-for-multiple-language-indexing/42767/2 "2016-02-25T19:23:18Z")

</div>

My mapping will not work but I am just proposing something like this would be nice. If somebody tried some other way to optimize . Thanks!

---

<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, 11:13pm UTC](https://discuss.elastic.co/t/will-this-document-structure-work-for-multiple-language-indexing/42767/3 "2017-07-05T23:13:36Z")

</div>


