0
我想從Go包elastic
使用BulkIndexRequest
。我試圖找到例子,但似乎它們不存在。所以如果有人使用它,你能幫我用它來創建像下面這樣的請求嗎?從golang包'elastic'使用BulkIndexRequest
curl -s -H "Content-Type: application/json" -XPOST localhost:9200/someindex/sometype/_bulk -d'
{ "index": {"_id": "existing_id"}}
{ "field1": "test1"}
{ "index": {"_id": "existing_id2"}}
{ "field2": "test2"}
'