Elasticsearch mapping已存在的键值强制更新
最近使用elasticsearch做搜索引擎索引的时候,需要多次修改索引,但是已经存在的索引无法更改,以为只能重建索引。突然发现使用ignore_conflicts=true参数可以强制更改。
$ curl -X PUT 'http://localhost:9200/thegame/weapons/_mapping?ignore_conflicts=true' -d \ '{ "weapons": { "properties": { "name": { "type": "string", "analyzer": "full_name" }, "description": { "type": "string" }, "category": { "type": "string" } } } }'
页面下部广告