# Reindex api errors out while reindexing when documents in the index exceed 2147483519

**URL:** <https://discuss.elastic.co/t/reindex-api-errors-out-while-reindexing-when-documents-in-the-index-exceed-2147483519/318771>\
**Category:** Elasticsearch\
**Created:** [November 12, 2022, 12:21pm UTC](https://discuss.elastic.co/t/reindex-api-errors-out-while-reindexing-when-documents-in-the-index-exceed-2147483519/318771 "2022-11-12T12:21:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srikant\_Magdum](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/srikant_magdum/32/98781_2.png) [@Srikant\_Magdum](https://discuss.elastic.co/u/Srikant_Magdum)\
**Post date:** [November 12, 2022, 12:21pm UTC](https://discuss.elastic.co/t/reindex-api-errors-out-while-reindexing-when-documents-in-the-index-exceed-2147483519/318771/1 "2022-11-12T12:21:44Z")

</div>

One of my shard in the index is in red state as the documents in that shard exceeded 2147483519 as below :

```auto
failed shard on node [GK1he55KSJmqQXx-qDrPFQ]: shard failure, reason [no-op origin[PRIMARY] seq#[350554097] failed at document level], failure IllegalArgumentException[number of documents in the index cannot exceed 2147483519]

```

according to prev posts the only solution is to reinde to new index with more shards or ILM in place  
while running re index on new index with 4 shards i get following error

```auto
{
    "error": {
        "root_cause": [],
        "type": "search_phase_execution_exception",
        "reason": "Partial shards failure (1 shards unavailable)",
        "phase": "query",
        "grouped": true,
        "failed_shards": []
    },
    "status": 503
}

```

dont understand how to proceed with re indexing

---

<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:** [November 15, 2022, 6:06am UTC](https://discuss.elastic.co/t/reindex-api-errors-out-while-reindexing-when-documents-in-the-index-exceed-2147483519/318771/2 "2022-11-15T06:06:57Z")

</div>

Can you share the output from `GET _cat/shards?v`?

---

<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:** [December 13, 2022, 6:07am UTC](https://discuss.elastic.co/t/reindex-api-errors-out-while-reindexing-when-documents-in-the-index-exceed-2147483519/318771/3 "2022-12-13T06:07:40Z")

</div>

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