Error - "error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [..] conflicts with existing mapper:...}

yunively·2022년 9월 14일
0

Error

목록 보기
1/1
post-thumbnail

elasticsearch mapping시 났던 에러

  • 프로젝트 중 한글 자동완성을 위해 index mapping을 진행했을 때 난 에러
# input
curl -u elastic -XPUT -H 'Content-Type: application/json' http://localhost:9200/fish/_mapping -d '{
   "properties": {
     "어종": {
       "type": "text",
       "store": true,
       "analyzer": "suggest_index_analyzer",
       "search_analyzer": "suggest_search_analyzer"
     }
   }
 }'
# error
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [어종] conflicts with existing mapper:\n\tCannot update parameter [store] from [false] to [true]\n\tCannot update parameter [analyzer] from [default] to [suggest_index_analyzer]"}],"type":"illegal_argument_exception","reason":"Mapper for [어종] conflicts with existing mapper:\n\tCannot update parameter [store] from [false] to [true]\n\tCannot update parameter [analyzer] from [default] to [suggest_index_analyzer]"},"status":400}

해결방안

있는 index 삭제하고 index 생성 후 데이터 넣기 전에 mapping 하기

profile
꾸준히 천천히

0개의 댓글