elasticsearch - 如何删除elasticsearch中的index.routing.allocation.include.tag

标签 elasticsearch

我通过执行以下命令为 elsticsearch 中的索引添加了一个包含标签。

curl -XPUT http://localhost:9200/my_index/_settings -d '{"index.routing.allocation.include.tag" : "tag1"}'

我没有看到任何设置后取消设置/删除标签的命令。 我可以将标签设置为空,但我想删除标签属性本身。

我们是否有任何选项可以删除此标签,目前它是这样的

{
"index": {
"creation_date": "1449858605286",
"routing": {
  "allocation": {
   "include": {
     "tag": ""
   }
  }
 }
}

最佳答案

最新的 Elasticsearch 版本(5.0+,如果我没记错的话)允许您unset configurations by setting them to null ,例如:

PUT /_cluster/settings
{
    "transient" : {
        "indices.recovery.max_bytes_per_sec" : null
    }
}

关于elasticsearch - 如何删除elasticsearch中的index.routing.allocation.include.tag,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35110722/

相关文章:

elasticsearch - 术语聚合上 doc_count 的范围过滤器

php - 搜索过滤器在Elastic Search PHP中不起作用

elasticsearch - 如何在 Elasticsearch Javascript API中定义主分片和副本分片的数量?

elasticsearch - 快照API无效

elasticsearch - Elasticsearch 是否有任何连续备份方法?

php - 经预期,PHP Elastica过滤的搜索未返回任何结果

elasticsearch - 从Kibana反规范化数据

elasticsearch - 通过 Fluent Api 在 Elastic Search/NEST 2.0 中设置 Id 字段

elasticsearch - 设置[集群]不能为空

elasticsearch - ElasticSearch:更新数组中的嵌套文档