# What is the proper settings and mapping for multiple languages

**URL:** <https://discuss.elastic.co/t/what-is-the-proper-settings-and-mapping-for-multiple-languages/156000>\
**Category:** Elasticsearch\
**Created:** [November 9, 2018, 8:16am UTC](https://discuss.elastic.co/t/what-is-the-proper-settings-and-mapping-for-multiple-languages/156000 "2018-11-09T08:16:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![3ms1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/3ms1/32/54472_2.png) [@3ms1](https://discuss.elastic.co/u/3ms1)\
**Post date:** [November 9, 2018, 8:16am UTC](https://discuss.elastic.co/t/what-is-the-proper-settings-and-mapping-for-multiple-languages/156000/1 "2018-11-09T08:16:02Z")

</div>

Hello,

I am looking for best possible to way to create an index where fields will have content in multiple languages.

Some part of this actually is copied from the documentation and I have already tested it, which answers to my needs such as ordering by name in aggregations, searching with space.

However, I am not truly sure that whether this is heavy structure.

Any opinions?

Thanks

```json
PUT /my_index
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0,
    "analysis": {
      "filter": {
        "arabic_stop": {
          "type": "stop",
          "stopwords": "_arabic_"
        },
        "arabic_keywords": {
          "type": "keyword_marker",
          "keywords": [
            "مثال"
          ]
        },
        "arabic_stemmer": {
          "type": "stemmer",
          "language": "arabic"
        },
        "english_stop": {
          "type": "stop",
          "stopwords": "_english_"
        },
        "english_keywords": {
          "type": "keyword_marker",
          "keywords": [
            "example"
          ]
        },
        "english_stemmer": {
          "type": "stemmer",
          "language": "english"
        },
        "english_possessive_stemmer": {
          "type": "stemmer",
          "language": "possessive_english"
        }
      },
      "analyzer": {
        "rebuilt_arabic": {
          "tokenizer": "standard",
          "filter": [
            "lowercase",
            "decimal_digit",
            "arabic_stop",
            "arabic_normalization",
            "arabic_keywords",
            "arabic_stemmer"
          ]
        },
        "rebuilt_english": {
          "tokenizer": "standard",
          "filter": [
            "english_possessive_stemmer",
            "lowercase",
            "english_stop",
            "english_keywords",
            "english_stemmer"
          ]
        }
      }
    }
  },
  "mappings": {
    "blog": {
      "properties": {
        "name": {
          "type": "text",
          "analyzer": "english",
          "fields": {
            "english": {
              "type": "text",
              "analyzer": "rebuilt_english"
            },
            "raw": {
              "type": "keyword",
              "normalizer": "custom_normalizer"
            }
          }
        },
        "name_localized": {
          "properties": {
            "ar": {
              "type": "text",
              "fields": {
                "english": {
                  "type": "text",
                  "analyzer": "rebuilt_arabic"
                }
              }
            },
            "en": {
              "type": "text",
              "fields": {
                "english": {
                  "type": "text",
                  "analyzer": "rebuilt_english"
                }
              }
            }
          }
        }
      }
    }
  }
}

```

---

<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:** [December 7, 2018, 8:16am UTC](https://discuss.elastic.co/t/what-is-the-proper-settings-and-mapping-for-multiple-languages/156000/2 "2018-12-07T08:16:07Z")

</div>

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