我最近将我的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"
}'
這是我現在在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
}
如何從控制台添加索引模式,避免這種多重映射問題?