# Reindexing a document with same version number but with different metadata

**URL:** <https://discuss.elastic.co/t/reindexing-a-document-with-same-version-number-but-with-different-metadata/249268>\
**Category:** Elasticsearch\
**Created:** [September 20, 2020, 5:23pm UTC](https://discuss.elastic.co/t/reindexing-a-document-with-same-version-number-but-with-different-metadata/249268 "2020-09-20T17:23:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnuk](https://avatars.discourse-cdn.com/v4/letter/v/43a26b/32.png) [@vishnuk](https://discuss.elastic.co/u/vishnuk)\
**Post date:** [September 20, 2020, 5:23pm UTC](https://discuss.elastic.co/t/reindexing-a-document-with-same-version-number-but-with-different-metadata/249268/1 "2020-09-20T17:23:04Z")

</div>

Hi,

I have the following use case.

1. An admin indexes the existing system during a small maintenance window , all good to go. We plan to use an external version for index document version
2. Users starts using the system again.. Live changes are indexed as well using the versions that exists in our database. Any requests that happens within millisec difference and goes to ES in a different order will get rejected as version numbers are not in order.. All good.
3. Now let us say doc1 is v3 . Now our system is configurable in a way that an admin could define , there are more business properties that needs to be part of the index. doc1 , v3 in our system has all this business fields, just that they were not configured/chosen as data that needs to be indexed.
4. Now the admin operation in 3, has to trigger an index on doc1 v3 again, but this time with more data.. If use `external` or `external_gt` , that operation will fail as version number is there
5. If I dont choose versioning at all, scenario in point 2 above will have issues in a highly transactional system.

I thought this is a scenario which is good for usage of `external_gte` version type. But the documentation warns about using that version type.. What are the potential issues if I use that option ?

Another option is to delete v3 , wait for 1 minute ( or configurable index.gc\_deletes seconds) , and then reindex again... Not sure about the performance impacts of reducing index\_gc\_deletes to say 5 seconds..

Any suggestions or thoughts on how best the above scenario can be handled in ES ?

---

<div class="post-metadata">

**Author:** ![vishnuk](https://avatars.discourse-cdn.com/v4/letter/v/43a26b/32.png) [@vishnuk](https://discuss.elastic.co/u/vishnuk)\
**Post date:** [September 20, 2020, 5:25pm UTC](https://discuss.elastic.co/t/reindexing-a-document-with-same-version-number-but-with-different-metadata/249268/2 "2020-09-20T17:25:07Z")

</div>

reason for choosing to index only configured metadata ( from doc1 v3 in above example) instead of indexing all metadata is to avoid the hard limits on number of metadata properties that can be indexed in a given index

---

<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:** [October 18, 2020, 5:25pm UTC](https://discuss.elastic.co/t/reindexing-a-document-with-same-version-number-but-with-different-metadata/249268/3 "2020-10-18T17:25:16Z")

</div>

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