在Elasticsearch 5.x群集中,多个索引中已弃用的设置已移至归档命名空间。如何删除无用的设置?
跟进Removing an Elasticsearch index setting,将2.x Elasticsearch集群迁移到5.x后,2.x索引级设置index.cache.query.enable
已移至archived.index.cache.query.enable
。我尝试使用indices update API通过将其设置为null来删除此设置:
curl -XPUT http://server:9200/index1/_settings -d'{ "archive": { "index": { "cache": { "query": { "enable": null } } } } }'
不幸的是,这只会导致错误:
{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[SERVER][ip_address:9300][indices:admin/settings/update]"}],"type":"illegal_argument_exception","reason":"unknown setting [index.archive.index.cache.query.enable] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"},"status":400}
请注意index
中显示的其他index.archive.index.cache.query.enable
。它在未提供时自动添加,这是问题的一部分:在设置中,archived
命名空间与index
命名空间处于同一级别,它不嵌套在它下面。< / p>
{
"index1": {
"settings": {
"archived": {
"index": {
"cache": {
"query": {
"enable": "false"
}
}
}
},
"index": {
"creation_date": "1501560004104",
"requests": {
"cache": {
"enable": "true"
}
},
"number_of_shards": "5",
"number_of_replicas": "1",
"uuid": "OQ5GKLvKRZ-XUpd_dYCFdA",
"version": {
"created": "2040399",
"upgraded": "5050299"
}
}
}
}
}
答案 0 :(得分:0)
不确定这是否已解决,但这是解决方案, 5.6中的_reindex删除已归档的设置。
价: https://github.com/elastic/elasticsearch/issues/27533#issuecomment-347188242