ElasticSearch - include_type_name is set to true error

SOUTH DARIA·2022년 2월 17일
0
PUT my_index/_mapping/_doc
{
  "properties": {
    "my_field": { 
      "type":     "text",
      "fielddata": true
    }
  }
}

field의 옵션을 변경하려 해당 쿼리를 날렸는데, 아래의 에러를 마주했다..

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true."
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true."
  },
  "status": 400
}

리서치를 해보니 아래와 같이 나왔는데

결론은

7.x 요청에 유형을 지정할 수 없기 때문에 발생하는 에러이다.
그래서 _doc 부분을 제거한 후 스키마 매핑값을 요청한다면 정상적으로 작동하게 된다.

하지만 현실은 구글 번역기와 함께..

profile
고양이와 함께 - 끄적끄적 개발하고 이씁니다 ~!

2개의 댓글

comment-user-thumbnail
2023년 6월 7일

This is a really helpful post. Thank you very much for sharing it for me and everyone to know. Play game Waffle online.

답글 달기
comment-user-thumbnail
2024년 3월 25일

We appreciate you taking the time to provide us with this crucial information. You wrote a pretty well-written and insightful post. Best Modem For Gaming In 2024

답글 달기