ElasticSearch: Insert Data via CommandLine

elastic

If you have a running ElasticSearch Instance and you would like to insert some JSON Documents via the CommandLine, then try this:

curl -XPOST 'http://localhost:9200///' -d '
{ 
  "firstName":"Max",
  "lastName":"Mustermann",
  "birthday":"01.01.1970",
  "email":"[email protected]"
}'

The Response should contain something like „created“:“true“, if everything worked find.

This is pretty easy to feed your SearchEngine with Data.