Elasticsearch Bulk Index JSON Data

后端 未结 3 1784
遥遥无期
遥遥无期 2020-11-28 08:18

I am trying to bulk index a JSON file into a new Elasticsearch index and am unable to do so. I have the following sample data inside the JSON

[{\"Amount\": \         


        
3条回答
  •  春和景丽
    2020-11-28 09:14

    As of today, 6.1.2 is the latest version of ElasticSearch, and the curl command that works for me on Windows (x64) is

    curl -s -XPOST localhost:9200/my_index/my_index_type/_bulk -H "Content-Type: 
    application/x-ndjson" --data-binary @D:\data\mydata.json
    

    The format of the data that should be present in mydata.json remains the same as shown in @val's answer

提交回复
热议问题