0

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

Thanks so much!

  • 1
    The error clearly states that issue is will `_all`. `_all` has been deprecated and cannot be enabled for es version 6.0+ – Nishant May 31 '19 at 03:30
  • @NishantSaini i am using 5.4.3, i just've changed the people's properties (before this change this worked) – Lautaro Aguirre May 31 '19 at 12:53

1 Answers1

0

correct:

"_all": {
      "enabled": true
    }

incorrect:

 "_all": {
      "enabled": "true"
    }
dejanmarich
  • 1,235
  • 10
  • 26