# Reindex does not create all documents

**URL:** <https://discuss.elastic.co/t/reindex-does-not-create-all-documents/121368>\
**Category:** Elasticsearch\
**Created:** [February 25, 2018, 9:11am UTC](https://discuss.elastic.co/t/reindex-does-not-create-all-documents/121368 "2018-02-25T09:11:18Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Dan\_Markhasin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dan_markhasin/32/14187_2.png) [@Dan\_Markhasin](https://discuss.elastic.co/u/Dan_Markhasin)\
**Post date:** [February 27, 2018, 3:23pm UTC](https://discuss.elastic.co/t/reindex-does-not-create-all-documents/121368/4 "2018-02-27T15:23:32Z")

</div>

This is actually a continuation of this issue:

> [@Scroll returns inconsistent number of results](https://discuss.elastic.co/t/scroll-returns-inconsistent-number-of-results/118018):
>
> We are using ElasticSearch 5.4.0 and noticed a strange behavior of the scroll API on a very specific index. The behavior we are seeing is that when scrolling with a simple match\_all query, the number of returned results is sometimes different than the "total" returned by ES. Sometimes it returns the exactly expected number, but sometimes it returns less. It is happening on a specific index, that is no longer active (i.e. no new data is written to it) - we haven't seen this problem on any other…

It happened again, on a different cluster. Then, when I tried to reindex the data from the "faulty" index, I noticed that reindex itself created less documents than the "total" of the original index reported, so I don't think it is possible to retrieve the "missing" documents, as Elasticsearch simply doesn't return them - only counts them in the "total" for search/scroll requests.

The index request was a straight-forward reindex, with only source and dest specified, no pipelines were used.

---

_[View the full topic](https://discuss.elastic.co/t/reindex-does-not-create-all-documents/121368)._
