我是 Elasticsearch (ELK) 的新手,我正在从事一个最初由外部公司完成的项目,但他们不会支持它,所以我正在尝试自己进行一些更改。
我要做的是更改字段名称,因为现在进入 Elasticsearch 的数据发生了一些变化。
如果我运行这个:
curl 'http://localhost:9200/_search?pretty'
我得到了映射(我猜是这个词)。它看起来像这样(简化了一点):
{
"_index" : ".kibana",
"_type" : "visualization",
"_id" : "Count-By-Clusters",
"_score" : 1.0,
"_source":{
"title":"Count by Clusters",
"visState":"{
"type": "histogram",
"params": {},
"aggs": [
{
"id": "1",
"type": "terms",
"schema": "group",
"params": {
"field": "cluster.id",
"size": 5,
"order": "desc",
"orderBy": "1"
}
},
{
...
}
]
}
}
},
{
"_index" : ".kibana",
"_type" : "visualization",
"_id" : "Users-By-Clusters",
"_score" : 1.0,
"_source":{
"title":"Users by Clusters",
"visState":"{
"type": "histogram",
"params": {},
"aggs": [
{
"id": "1",
"type": "terms",
"schema": "group",
"params": {
"field": "cluster.id",
"size": 5,
"order": "desc",
"orderBy": "1"
}
},
{
...
}
]
}
}
}
这些映射有八个,我只展示了其中两个。
问题是,"field": "cluster.id"
现在必须如此"field": "cluster_id"
,我似乎无法找到改变它的方法。
我什至尝试只创建新的映射,但我收到错误消息说.kibana
已经存在,即使我已经拥有不只是一个,而是八个带有"_index" : ".kibana"
.
我已经搜索了文档,但我仍然卡住了。也许我在寻找错误的地方。我将不胜感激帮助和/或有关如何执行此操作的指示。
谢谢。