如何从索引中删除动态设置?不更改其值,而是将其完全删除。
我必须将2.x Elasticsearch集群迁移到最新的5.x版本。运行elasticsearch-migration插件,我在“索引设置”:“已替换的设置”-> index.cache.query.enable
已被index.requests.cache.enable
取代的地方看到红色警告(表示“您不能升级而不解决此问题。”)。但是https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_settings_changes.html不会告诉您如何删除设置,而https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices.html也不会告诉您(除非我错过了一些东西)。
我可以使用REST API添加新设置:curl -XPUT http://server:9200/index1/_settings -d"{ "index": { "requests": { "cache": { "enable": "true" } } } }"
。但这不会删除旧设置,elasticsearch-migration警告也不会消失。
再次使用API,我可以将index.cache.query.enable
值从true
更改为false
,但这并不能将其删除。我尝试将其设置为null
,但这没有效果。因此,我陷入了无法摆脱的设置,并且阻止了迁移(根据elastic-migration
插件)。
最佳答案
在Elasticsearch 2.x中似乎没有解决方案删除索引设置
就是说,有关index.cache.query.enable
的错误没有阻止。我将群集从2.x更新到5.x,但未修复该警告。更新后的集群可以正常运行,并且有问题的设置已自动移至archived
命名空间。
关于elasticsearch - 删除Elasticsearch索引设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45986005/