# Reindexing of the same document

**URL:** <https://discuss.elastic.co/t/reindexing-of-the-same-document/273629>\
**Category:** Elasticsearch\
**Created:** [May 21, 2021, 7:44am UTC](https://discuss.elastic.co/t/reindexing-of-the-same-document/273629 "2021-05-21T07:44:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renat\_Zamaletdinov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/renat_zamaletdinov/32/89077_2.png) [@Renat\_Zamaletdinov](https://discuss.elastic.co/u/Renat_Zamaletdinov)\
**Post date:** [May 21, 2021, 7:44am UTC](https://discuss.elastic.co/t/reindexing-of-the-same-document/273629/1 "2021-05-21T07:44:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 25, 2021, 12:06am UTC](https://discuss.elastic.co/t/reindexing-of-the-same-document/273629/2 "2021-05-25T00:06:54Z")

</div>

Welcome to our community! 😃

Try it out!

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

```

Response;

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

```

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

```

Response;

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

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2021, 12:07am UTC](https://discuss.elastic.co/t/reindexing-of-the-same-document/273629/3 "2021-06-22T00:07:14Z")

</div>

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