how insert data to Elasticsearch without id

elasticsearch

Solution

The index operation can be executed without specifying the id. In such a case, an id will be generated automatically. In addition, the op_type will automatically be set to create. Here is an example (note the POST 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"
}'

Problem

I insert data to Elasticsearch with id 123 ``` localhost:9200/index/type/123 ``` but I do not know what will next id inserted how insert data to Elasticsearch without id in localhost:9200/index/type?

Original source