# \_reindex API issue

**URL:** <https://discuss.elastic.co/t/-reindex-api-issue/58492>\
**Category:** Elasticsearch\
**Created:** [August 19, 2016, 9:52pm UTC](https://discuss.elastic.co/t/-reindex-api-issue/58492 "2016-08-19T21:52:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Post date:** [August 19, 2016, 9:52pm UTC](https://discuss.elastic.co/t/-reindex-api-issue/58492/1 "2016-08-19T21:52:08Z")

</div>

When I try to \_reindex an existing index to new index, I see drop in document volume. I’m trying to do it as the original is created with wrong mapping.

\_count API on original results as below

{  
"count": 3273105,  
"\_shards": {  
"total": 5,  
"successful": 5,  
"failed": 0  
}  
}

\_count API on new results as below  
{  
"count": 267199,  
"\_shards": {  
"total": 2,  
"successful": 2,  
"failed": 0  
}  
}

I see a huge difference. The process didn’t throw any error as well. Any pointers!

---

<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:** [August 19, 2016, 10:13pm UTC](https://discuss.elastic.co/t/-reindex-api-issue/58492/2 "2016-08-19T22:13:50Z")

</div>

Providing the reindex request you made would be helpful.

---

<div class="post-metadata">

**Author:** ![Karthik\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Post date:** [August 19, 2016, 11:01pm UTC](https://discuss.elastic.co/t/-reindex-api-issue/58492/3 "2016-08-19T23:01:27Z")

</div>

Hi Mark,

Below is the exact request made (using sense plugin)

POST /\_reindex  
{  
"source": {  
"index": "IdxOld"  
},  
"dest": {  
"index": "IdxNew"  
}  
}

I passed the parameter wait\_for\_complete=true to request.  
Few other information:  
Source Index has 5 shards/1 Replica in settings and went with default mapping (all analyzed strings).  
Target has a valid mapping, which it is intended for. It has 2 shards/1 Replica in settings.  
No errors were thrown

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [August 20, 2016, 11:01am UTC](https://discuss.elastic.co/t/-reindex-api-issue/58492/4 "2016-08-20T11:01:54Z")

</div>

From here I can't tell what happened those kinds of reindex requests work  
fine for me.

---

<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:** [July 5, 2017, 10:26pm UTC](https://discuss.elastic.co/t/-reindex-api-issue/58492/5 "2017-07-05T22:26:25Z")

</div>


