# Reindexing not copying all data

**URL:** https://discuss.elastic.co/t/reindexing-not-copying-all-data/230837
**Category:** Elasticsearch
**Tags:** docker
**Created:** [May 3, 2020, 12:50am UTC](https://discuss.elastic.co/t/reindexing-not-copying-all-data/230837 "2020-05-03T00:50:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![alajangi](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alajangi](https://discuss.elastic.co/u/alajangi)
#### Post date: [May 3, 2020, 12:50am UTC](https://discuss.elastic.co/t/reindexing-not-copying-all-data/230837/1 "2020-05-03T00:50:00Z")

</div>

Hi,

my elasticsearch version is 6.5.1

I want to clone an index, I am doing it in kibana devtools console,

```auto
POST _reindex
{
  "source": {
    "index": "source"
  },
  "dest": {
    "index": "dest"
      }
}

```

I am unable to get whole data, just getting 997 docs out of 157k docs, what am i doing wrong? also the destination index always up to date whenever the source index updated, could someone assist me ?

Thank you,  
Kishore Kumar.

---

<div class="post-metadata">

### Author: ![Rahul\_Kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_kumar4/32/67369_2.png) [@Rahul\_Kumar4](https://discuss.elastic.co/u/Rahul_Kumar4)
#### Post date: [May 3, 2020, 1:15am UTC](https://discuss.elastic.co/t/reindexing-not-copying-all-data/230837/2 "2020-05-03T01:15:15Z")

</div>

One reason why this could be happening is because your source index may have duplicate docs. Try a `UNIQUE COUNT` aggregation on the field `_id` in Kibana visualization on your `source` index and see what number this is.

If you want to do a full copy try setting the `op_type` in `destination` part of your request body to `create`. The default is `index` which just updates the doc if it already existed. - [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html)

---

<div class="post-metadata">

### Author: ![alajangi](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alajangi](https://discuss.elastic.co/u/alajangi)
#### Post date: [May 3, 2020, 8:56am UTC](https://discuss.elastic.co/t/reindexing-not-copying-all-data/230837/3 "2020-05-03T08:56:50Z")

</div>

Hi Rahul,  
I reindexed again by using op\_type, and checked "unique count" in kibana both source and dest indexes, source: 124 and dest: 997, how is it possible? when i am trying to access new index in my python program i am getting "RequestError(400, 'search\_phase\_execution\_exception', 'Fielddata is disabled on text fields by default. Set fielddata=true on [job] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.')" error, i am able to access without any issue with old index though,  
Thanks,  
Kishore.

---

<div class="post-metadata">

### Author: ![alajangi](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alajangi](https://discuss.elastic.co/u/alajangi)
#### Post date: [May 4, 2020, 5:52pm UTC](https://discuss.elastic.co/t/reindexing-not-copying-all-data/230837/4 "2020-05-04T17:52:39Z")

</div>

Hi,

I did mapping same as source index before reindex, but the UNIQUE COUNT in kibana visualize showing huge difference, source is 230 dest is 138,884, anyway the documents are same 158k in both, also i am able to access the index from my python program.  
can anyone help me how to keep update my new index with my source index, say if any new data come to my source index, it has to update on my new index also?

Thank you,  
Kishore.

---

<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 1, 2020, 5:52pm UTC](https://discuss.elastic.co/t/reindexing-not-copying-all-data/230837/5 "2020-06-01T17:52:45Z")

</div>

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