# Queries regarding reindexing

**URL:** <https://discuss.elastic.co/t/queries-regarding-reindexing/340517>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [August 10, 2023, 7:33am UTC](https://discuss.elastic.co/t/queries-regarding-reindexing/340517 "2023-08-10T07:33:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANUBHAV\_GUPTA](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@ANUBHAV\_GUPTA](https://discuss.elastic.co/u/ANUBHAV_GUPTA)\
**Post date:** [August 10, 2023, 7:33am UTC](https://discuss.elastic.co/t/queries-regarding-reindexing/340517/1 "2023-08-10T07:33:12Z")

</div>

Hi there,  
I want to get some clarity on the reindexing API and how does it work.  
After talking to an ES developer I understood few points on the high level.  
But still I am having a doubt with the below question:-

If I want to reindex an index again which has been reindexed earlier. But this time I have made some updates in the source index.  
Does reindexing again would update the destination?

I tried doing this like:  
First, I did reindexing with particular source and destination  
Second, Then I deleted one document from the source index and did reindexing with same source and destination.  
But the destination is showing the earlier count of the documents (It is neither increased nor decreased)

Please someone help me understand this

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 10, 2023, 7:40am UTC](https://discuss.elastic.co/t/queries-regarding-reindexing/340517/2 "2023-08-10T07:40:14Z")

</div>

> [@ANUBHAV\_GUPTA](#):
>
> First, I did reindexing with particular source and destination  
> Second, Then I deleted one document from the source index and did reindexing with same source and destination.  
> But the destination is showing the earlier count of the documents (It is neither increased nor decreased)

Reindexing reads all existing documents in the source index (at the time it is started) and writes them to the destination index. Updated documents will be read but deleted documents are no longer present, so you get to keep the original document in the destination index. If you marked it as deleted and excluded it from queries it would be transferred as it still exists but just deleting it will not unless you reindex to a new and empty index.

---

<div class="post-metadata">

**Author:** ![ANUBHAV\_GUPTA](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@ANUBHAV\_GUPTA](https://discuss.elastic.co/u/ANUBHAV_GUPTA)\
**Post date:** [August 10, 2023, 9:48am UTC](https://discuss.elastic.co/t/queries-regarding-reindexing/340517/3 "2023-08-10T09:48:11Z")

</div>

So the reindex is not for someone, who wants to get the delta updates made to the source to the destination?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 10, 2023, 10:17am UTC](https://discuss.elastic.co/t/queries-regarding-reindexing/340517/4 "2023-08-10T10:17:11Z")

</div>

No, that is what [cross-cluster replication](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/ccr-apis.html), which is a commercial feature, is for.

---

<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:** [September 7, 2023, 10:17am UTC](https://discuss.elastic.co/t/queries-regarding-reindexing/340517/5 "2023-09-07T10:17:14Z")

</div>

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