본문 바로가기
Error

elasticsearch 에러 {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}],"type":"illegal_argument_exception","reason":"Types c..

by reo.l 2021. 6. 8.

 

 

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
  },
  "status" : 400
}

 

mapping 도중 발생한 에러인데 

 

"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."

 

elasticsearch 7.0v 이후부터는 mapping api에 include_type_name을 명시해 주어야 한다고 한다.

 

curl -XPUT 'http://localhost:9200/classes/class/_mapping?include_type_name=true&pretty' -d @classesRating_mapping.json -H 'Content-Type: application/json'

 

이렇게 파라미터로 추가해준다.

 

 

댓글