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