# Elasticsearch 5.4 - illegal\_argument\_exception al crear un index con custom analyzer

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-4-illegal-argument-exception-al-crear-un-index-con-custom-analyzer/183575>\
**Category:** Elasticsearch\
**Created:** [May 30, 2019, 4:36pm UTC](https://discuss.elastic.co/t/elasticsearch-5-4-illegal-argument-exception-al-crear-un-index-con-custom-analyzer/183575 "2019-05-30T16:36:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lautaro\_Aguirre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lautaro_aguirre/32/47175_2.png) [@Lautaro\_Aguirre](https://discuss.elastic.co/u/Lautaro_Aguirre)\
**Post date:** [May 30, 2019, 4:36pm UTC](https://discuss.elastic.co/t/elasticsearch-5-4-illegal-argument-exception-al-crear-un-index-con-custom-analyzer/183575/1 "2019-05-30T16:36:27Z")

</div>

Hi, i am using the Elasticsearch's PHP API and Advanced REST Client (ARC), both to test the ES API. When i try to create a new index with a custom analyzer, i get this error:

```
"error": {
"root_cause": [
  {
"type": "illegal_argument_exception",
"reason": "unknown setting [index.body.mappings.applications._all.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.body.mappings.applications._all.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}

```

I have tried removing the analysis setting and the index was created succesfully. Also i tried removing filters from the custom analyzer and i have reinstalled 2 times ES.

```
{
  "index": "ar",
  "body": {
    "settings": {
      "analysis": {
        "analyzer": {
          "spanish": {
            "type": "custom",
            "tokenizer": "standard",
            "filter": [
              "lowercase",
              "asciifolding"
            ]
          }
        },
        "filter": {
          "spanish_stemmer": {
            "type": "stemmer",
            "language": "light_spanish"
          },
          "spanish_stop": {
            "type": "stop",
            "stopwords": "_spanish_"
          }
        }
      }
    },
    "mappings": {
      "people": {
        "_all": {
          "enabled": "true"
        },
        "properties": {
          "email": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "url": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "created_at": {
            "type": "date"
          },
          "avatar64": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "description": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "first_name": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "last_name": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "nickname": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "phone": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "state": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "phone2": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "country": {
            "type": "integer"
          },
          "headline": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "location": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "slug_url": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "zip_code": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "modified_at": {
            "type": "date"
          }
        }
      },
      "applications": {
        "_all": {
          "enabled": "true"
        },
        "_parent": {
          "type": "people"
        },
        "properties": {
          "applicant_name": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "applied_at": {
            "type": "date"
          },
          "email": {
            "type": "keyword",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "job_id": {
            "type": "integer"
          },
          "message": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "status": {
            "type": "boolean"
          }
        }
      },
      "resume_details": {
        "_all": {
          "enabled": "true"
        },
        "_parent": {
          "type": "people"
        },
        "properties": {
          "type": {
            "type": "integer"
          },
          "title": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "grantor": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          },
          "message": {
            "type": "text",
            "analyzer": "spanish",
            "search_analyzer": "spanish"
          }
        }
      }
    }
  }
}

```

Must create the index with that analyzer  
Stackoverflow topic: [https://es.stackoverflow.com/questions/268192/elasticsearch-5-4-illegal-argument-exception-al-crear-un-index-con-custom-anal](https://es.stackoverflow.com/questions/268192/elasticsearch-5-4-illegal-argument-exception-al-crear-un-index-con-custom-anal)  
Thanks so much!

---

<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 2, 2019, 3:19am UTC](https://discuss.elastic.co/t/elasticsearch-5-4-illegal-argument-exception-al-crear-un-index-con-custom-analyzer/183575/2 "2019-06-02T03:19:58Z")

</div>

I believe you need to remove this part:

```
    "_all": {
      "enabled": "true"
    },

```

Please note that you won't be able to use multiple types anymore if you upgrade to 7.x at some point.

---

<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:** [June 30, 2019, 3:20am UTC](https://discuss.elastic.co/t/elasticsearch-5-4-illegal-argument-exception-al-crear-un-index-con-custom-analyzer/183575/3 "2019-06-30T03:20:07Z")

</div>

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