如何更新elasticsearch上的Map沿着现有字段

rkkpypqq  于 2023-03-22  发布在  ElasticSearch
关注(0)|答案(1)|浏览(175)

`如何在Elasticsearch的现有模板中添加两个新字段
以下是当前模板

curl -XGET 'http://endpoint_name/_template/es_template_dev?pretty'{"voice_incoming_es_template_dev" : {"order" : 0,"index_patterns" : ["data_dev*"],"settings" : {"index" : {"number_of_shards" : "1"}},"mappings" : {"es_template_dev" : {"properties" : {"id" : {"type" : "long"},"unqid_es" : {"type" : "keyword"},"id_call" : {"type" : "keyword"},"parent_id" : {"type" : "keyword"
}
  }
},
"aliases" : { }
}}}

我正在获取以下错误

curl -XPUT -H "Content-Type: application/json" "http:endpoint/mapping/es_data_dev/"  -d '{"properties": {"duration": {"type": "integer"},"duration_agents": {"type": "integer"}}}'{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [2022_09] as the final mapping would have more than 1 type: [bd_stg, 20230301]"}],"type":"illegal_argument_exception","reason":"Rejecting mapping update to [voice_summary_obd_stg_2022_09] as the final mapping would have more than 1 type: [voice_stg, es_data_dev_20230301]"},"status":400}`
2izufjch

2izufjch1#

您可以使用Kibana UI轻松更新Map。

相关问题