Bulk Insert

Let's ingest all the documents in the file sample.json at once using the following command:

curl -H 'Content-Type: application/json' -XPUT 'localhost:9200/my_index/customer/_bulk?pretty&refresh' --data-binary "@sample.json"

Let's verify all the records using our favorite browser. It will show all the three records:

http://localhost:9200/my_index/_search

Get Modern Big Data Processing with Hadoop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.