# Can't got actual data size and documents

**URL:** <https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [May 22, 2021, 4:38am UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714 "2021-05-22T04:38:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [May 22, 2021, 4:38am UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714/1 "2021-05-22T04:38:17Z")

</div>

I was reindexing one index but while using the reindex api the size of the previous index and new index is not same.  
**source index**  
`GET /_cat/indices/log-test1?v&pretty`

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open log-test1 2ZSW9EdnT2SJwxSCFmk64g 1 1 20920610 0 16.4gb 8.2gb

```

**destination**  
`GET /_cat/indices/log-test-1-2021.05.22-000001?v&pretty`

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open log-test-1-2021.05.22-000001 EBVL_urcSfC6XgnUG0CFNQ 1 1 6772999 0 4.9gb 2.4gb

```

The command i run

```auto
POST _reindex?wait_for_completion=true
{
  "source": {
    "index": "log-test1"
  },
  
  "dest": {
    "index": "log-test-1-2021.05.22-000001"
  }
}

```

to check its status  
`GET _tasks?actions=*reindex`and the output is

```auto
{
  "nodes" : { }
}

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 22, 2021, 6:22am UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714/2 "2021-05-22T06:22:45Z")

</div>

Anything in elasticsearch logs?

I'd try also without `wait_for_completion`.

---

<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:** [May 22, 2021, 6:30am UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714/3 "2021-05-22T06:30:17Z")

</div>

The document count differs. Did the reindex complete? Are there any differences in mappings, e.g. differences in use of nested mappings or analysers?

---

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [May 22, 2021, 6:57am UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714/4 "2021-05-22T06:57:23Z")

</div>

No but size of the index is different

---

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [May 22, 2021, 6:59am UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714/5 "2021-05-22T06:59:41Z")

</div>

I had test this on small index size around 2 gb after 5 10 minutes the new index size and documents was same as previous index

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 22, 2021, 3:02pm UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714/6 "2021-05-22T15:02:33Z")

</div>

You should use this for larger reindex, async task notice the `false` see [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-task-api)

`POST _reindex?wait_for_completion=false`

Even if the the index has the exact number of documents the size might be slightly different , because the first index may have had segments merged etc but the should be pretty close.  
.

---

<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 19, 2021, 3:02pm UTC](https://discuss.elastic.co/t/cant-got-actual-data-size-and-documents/273714/7 "2021-06-19T15:02:54Z")

</div>

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