Elasticsearch: bulk importing a JSON file
You can use the _bulk API to bulk import a large JSON file into Elasticsearch. curl -s -H "Content-Type: application/json" -XPOST \ 'http://localhost:9200/_bulk' --data-binary @/path/to/products.json The products.json file must be formatted in the following way: { "index" : { "_index" : "products", "_id" : "1" } } { "title" : "Nike Running Shoes" } { "index" : { "_index" : "products", "_id" : "2" } } { "title" : "Adidas Basketball Shoes" } As you can see in the file snippet above, each record requires two lines:...