반응형

명령어

    Elasticsearch에서 reindex를 이용해서 매핑정보 변경하기

    Elasticsearch에서 index를 구성하다보면 매핑정보를 추가하거나 수정하고 싶을때가 있다. 내가 아는 내에서는 한번 생성된 index의 매핑정보를 변경하는건 어렵다. 그래서 reindex를 통해 index의 매핑정보를 변경해줘야한다. 우선 wedul_mapping이라는 인덱스가 있다고 해보자. 매핑 정보는 다음과 같다. PUT wedul_mapping { "mappings": { "_doc": { "dynamic": "false", "properties": { "id": { "type": "integer" }, "name": { "type": "text", "fields": { "keyword": { "type": "keyword" } } } } } } } 이때 name에서 keyword필드를 ..

반응형