Auto ID Creation
An index operation can be performed without specifying an identifier. In this case, the identifier will be generated automatically. In addition, op_type will be automatically configured to create. Here is an example (note that POST is used instead of PUT):
$ curl -XPOST 'http://localhost:9200/twitter/tweet/' -d '{ "user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elasticsearch" }'
Result:
{ "_index" : "twitter", "_type" : "tweet", "_id" : "6a8ca01c-7896-48e9-81cc-9f70661fcb32", "_version" : 1, "created" : true }
source share