0
我拥有大量具有相同索引和相同类型,但ID明显不同的文档。我想要更新现有的或批量插入新的。我怎样才能使用批量索引API来实现它?我想要做下面的事情,但会引发错误。基本上,我想批量插入具有相同索引和相同类型的多个文档。使用批量API将批量批量插入弹性搜索存储
curl -s -H "Content-Type: application/json" -XPOST localhost:9200/_bulk -d'
{ "index": {"_type": "sometype", "_index": "someindex"}}
{ "_id": "existing_id", "field1": "test1"}
{ "_id": "existing_id2", "field2": "test2"}
'
在这里你去https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html – anekix
@anekix:谢谢,但文档不包含我想要的。 – Rohanil