Elasticsearch “no requests added” Bulk API Error

后端 未结 3 1944
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 00:07

Trying to get Bulk Update to work on ES 1.0.1.

I am within Postman posting the following:

URL POST or PUT to

3条回答
  •  旧巷少年郎
    2020-12-14 00:36

    If you're using cURL, you must have a blank line at the end of your bulk items and you must use --data-binary (instead of plain -d). For example, suppose you have a file called bulk that has:

    { "index" : { "_id" : 1 } }
    { "accounts" : ["hillary", "sidney"]}
    { "index" : { "_id" : 2 } }
    { "accounts" : ["hillary", "donald"]}
    { "index" : { "_id" : 3 } }
    { "accounts" : ["vladimir", "donald"]}
    

    Ensure the file is terminated by a blank line, then post with cURL:

    curl -i -XPOST -H'content-type: application/json' 'localhost:9200/emails/message/_bulk?refresh&pretty' --data-binary @bulk
    

提交回复
热议问题