Jul*_*ero 7 lucene request elasticsearch kibana
我最近将我的ElasticStack实例从5.5升级到6.0,看来这个版本的一些重大变化已经损害了我的管道.我有一个脚本,根据ElasticSearch中的索引,为一些类似索引的组自动创建索引模式.问题是,随着6.0版本的新映射更改,我无法从控制台添加任何新的索引模式.这是我使用的请求并在5.5中正常工作:
curl -XPOST "http://localhost:9200/.kibana/index-pattern" -H 'Content- Type: application/json' -d'
{
"title" : "index_name",
"timeFieldName" : "execution_time"
}'
Run Code Online (Sandbox Code Playgroud)
这是我现在在6.0中从ElasticSearch获得的响应:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [index-pattern, doc]"
}
],
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [index-pattern, doc]"
},
"status": 400
}
Run Code Online (Sandbox Code Playgroud)
如何从控制台添加索引模式,避免这种多重映射问题?
小智 5
URL已在6.0.0版本中更改,这是新的URL:
http:// localhost:9200 / .kibana / doc / doc:index-pattern:my-index-pattern-name
此CURL应该适合您:
curl -XPOST "http://localhost:9200/.kibana/doc/index-pattern:my-index-pattern-name" -H 'Content-Type: application/json' -d'
{
"type" : "index-pattern",
"index-pattern" : {
"title": "my-index-pattern-name*",
"timeFieldName": "execution_time"
}
}'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4390 次 |
| 最近记录: |