# Ingest issue during re-indexing/cloning?

**URL:** <https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466>\
**Category:** Elasticsearch\
**Created:** [February 24, 2023, 7:03pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466 "2023-02-24T19:03:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GenSSC](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@GenSSC](https://discuss.elastic.co/u/GenSSC)\
**Post date:** [February 24, 2023, 7:03pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466/1 "2023-02-24T19:03:48Z")

</div>

Hello !

I need to re-index multiple indices prior to an update of our stack.

In order to test the reindexing process, I am cloning an index. However, the index needs to be read-only. My question is...what if data is ingested during the read-only phase? Will it be lost?

Thank you !

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 24, 2023, 9:18pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466/2 "2023-02-24T21:18:26Z")

</div>

> [@GenSSC](#):
>
> My question is...what if data is ingested during the read-only phase? Will it be lost?

Probably yes, to clone an index it needs to be on read-only mode, which blocks write, so new data will not be added to the index.

Depending on how you are indexing the data, it may be written after you remove the read-only, for example, but you also may have lost those data.

Clone and reindex are different operations, you can reindex an index that is still receiving data, but it will only reindex the data that already exists in the index when you triggered the reindex action, every new data added after this will note be present on the reindexed index and you will need to do another reindex to get that data.

---

<div class="post-metadata">

**Author:** ![GenSSC](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@GenSSC](https://discuss.elastic.co/u/GenSSC)\
**Post date:** [February 27, 2023, 1:11pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466/3 "2023-02-27T13:11:47Z")

</div>

Thank you for your response.

Regarding the reindexing, do you mean that data added, let's say even one week later, will not be reindexed? In my environment, data is being ingested all the time.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 27, 2023, 1:13pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466/4 "2023-02-27T13:13:52Z")

</div>

> [@GenSSC](#):
>
> Regarding the reindexing, do you mean that data added, let's say even one week later, will not be reindexed?

The data added after the reindex request is made.

If you make a reindex request for an index now, and 1 milisecond later you add a new document, this new document will not be part of that reindex request and will not be reindexed.

---

<div class="post-metadata">

**Author:** ![GenSSC](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@GenSSC](https://discuss.elastic.co/u/GenSSC)\
**Post date:** [February 27, 2023, 1:45pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466/5 "2023-02-27T13:45:24Z")

</div>

So basically when you reindex, it sort of locks your index forever?  
I need to reindex everything because they were created with an older version. Someone from Elastic Search told me I need to reindex pretty much everything but never told me I wouldn't be able to work with my indices afterwards... 🫤

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 27, 2023, 2:17pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466/6 "2023-02-27T14:17:29Z")

</div>

> [@GenSSC](#):
>
> Someone from Elastic Search told me I need to reindex pretty much everything but never told me I wouldn't be able to work with my indices afterwards...

If you need to reindex your indices to increase the index version of it, you should **stop** writing on the old indices and start writing in new ones.

If you keep writing in the old indices, it makes no sense to reindex because a reindex is a snapshot of the data at the moment when the request is made, you would need to keep doing reindex after reindex to keep your data up to date.

In your case you should start ingest your data in **new** indices and reindex the old data from indices that are not being written anymore.

---

<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:** [March 27, 2023, 2:17pm UTC](https://discuss.elastic.co/t/ingest-issue-during-re-indexing-cloning/326466/7 "2023-03-27T14:17:54Z")

</div>

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