Reindexing of the same document

What will happen if we upsert an existing document with the same content and the same id? Will it trigger reindexing? Or it will detect that nothing is changed and will do nothing?

Welcome to our community! :smiley:

Try it out!

POST test/_doc/1
{
  "value": 1
}

Response;

{
  "_index" : "test",
  "_type" : "_doc",
  "_id" : "1",
  "_version" : 1,
  "result" : "created",
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  },
  "_seq_no" : 0,
  "_primary_term" : 1
}
POST test/_doc/1
{
  "value": 1
}

Response;

{
  "_index" : "test",
  "_type" : "_doc",
  "_id" : "1",
  "_version" : 2,
  "result" : "updated",
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  },
  "_seq_no" : 1,
  "_primary_term" : 1
}

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