Add data to Elasticsearch

Will Button
InstructorWill Button

Share this video with your friends

Send Tweet

In this lesson, you will learn how to add new documents to the Elasticsearch data store using HTTP methods and the Elasticsearch API. You will also learn how Elasticsearch uniquely identifies each document and what happens when you attempt to create a document that already exists.

Adam Kucharczyk
Adam Kucharczyk
~ 3 years ago

curl -XPUT -H'Content-type: application/json' -d '{"title": "Add data to elasticsearch", "summary": "Learn to index into es", "views":"10000"}' localhost:9200/egghead/lessons/3

https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests