Update _id field

Can we update _id field of a doc.

POST /test_region/_doc/01
{
"id":"222",
"userName":"Kumar",
"region":"DelhiNew"
}
Doc value :slight_smile:
{
"_index" : "test_region",
"_type" : "_doc",
"_id" : "01",
"_score" : 1.0,
"_source" : {
"id" : "222",
"userName" : "Kumar",
"region" : "DelhiNew"
}

Required Doc

{
"_index" : "test_region",
"_type" : "_doc",
"_id" : "01_DelhiNew",
"_score" : 1.0,
"_source" : {
"id" : "222",
"userName" : "Kumar",
"region" : "DelhiNew"
}

Requ

No. That will require you to add the document with the new id and separately delete the old one.

Ok.Thanks