# Multiple custom analyzers in a single index

**URL:** <https://discuss.elastic.co/t/multiple-custom-analyzers-in-a-single-index/58853>\
**Category:** Elasticsearch\
**Created:** [August 24, 2016, 5:12pm UTC](https://discuss.elastic.co/t/multiple-custom-analyzers-in-a-single-index/58853 "2016-08-24T17:12:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramdev\_Wudali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramdev_wudali/32/7894_2.png) [@Ramdev\_Wudali](https://discuss.elastic.co/u/Ramdev_Wudali)\
**Post date:** [August 24, 2016, 5:12pm UTC](https://discuss.elastic.co/t/multiple-custom-analyzers-in-a-single-index/58853/1 "2016-08-24T17:12:24Z")

</div>

Hi I am trying to add multiple custom analyzers to analyzer a specific field.

So my mapping would look like so :

```
{  
    "mappings": {
      "entity": {
        "properties": {
          "ids": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "fields": {
              "autocomplete_name": {
                "type": "string",
                "analyzer": "edge_Ngram_analyzer",
                "search_analyzer": "whitespace"
              },
              "shingle_name": {
                "type": "string",
                "analyzer": "shingle_analyzer"
              }
            }
          },
          "type": {
            "type": "string",
            "index": "not_analyzed"
          }
        }
      }
    }
}

```

How can I create the settings which includes the custom analyzers: edge\_Ngram\_analyzer, and shingle\_analyzer ?  
(this is an example so please excuse the names if there are analyzers already existing with the same names)

The settings I have been using do not seem to be right in syntax....

Thanks

Ramdev

---

<div class="post-metadata">

**Author:** ![Ramdev\_Wudali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramdev_wudali/32/7894_2.png) [@Ramdev\_Wudali](https://discuss.elastic.co/u/Ramdev_Wudali)\
**Post date:** [August 24, 2016, 9:23pm UTC](https://discuss.elastic.co/t/multiple-custom-analyzers-in-a-single-index/58853/2 "2016-08-24T21:23:40Z")

</div>

I solved this problem, there was mistake in my mapping file and command to PUT the mapping in the index.

---

<div class="post-metadata">

**Author:** ![nsarchar](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@nsarchar](https://discuss.elastic.co/u/nsarchar)\
**Post date:** [March 15, 2017, 7:01pm UTC](https://discuss.elastic.co/t/multiple-custom-analyzers-in-a-single-index/58853/3 "2017-03-15T19:01:36Z")

</div>

You'd better share your solution too, mate.  
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, 10:02pm UTC](https://discuss.elastic.co/t/multiple-custom-analyzers-in-a-single-index/58853/4 "2017-07-05T22:02:12Z")

</div>


