Automatic document id generation in elasticSearch

Hi,
I was inserting the data as below.

PUT /employees/employee/1
{
"name":"Crescent School", "description":"State Board Affiliation", "street":"Tonk Road",
"city":"Jaipur", "state":"RJ", "zip":"176114","location":[26.8535922, 75.7923988],
"fees":2500, "tags":["Well equipped labs"], "rating":"4.5"
}

PUT /employees/employee/2
{
"name":"Crescent School", "description":"State Board Affiliation", "street":"Tonk Road",
"city":"Jaipur", "state":"RJ", "zip":"176114","location":[26.8535922, 75.7923988],
"fees":2500, "tags":["Well equipped labs"], "rating":"4.5"
}

I want the document id to be automatically generated when I insert a row into elastic search document. Is there a way to generate Automatci document id.

Thanks,
Balu

Just do PUT /employees/employee with the corresponding document.

Thank you warkolm. Issue resolved.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.