# Reindex 1 index to multiple indexes

**URL:** <https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667>\
**Category:** Elasticsearch\
**Created:** [May 17, 2023, 2:04pm UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667 "2023-05-17T14:04:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticvakif](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@elasticvakif](https://discuss.elastic.co/u/elasticvakif)\
**Post date:** [May 17, 2023, 2:04pm UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/1 "2023-05-17T14:04:49Z")

</div>

We have an index which is around 120 gb. we want to split it multiple indices. Is there any way to do that ? I guess reindex supports 1 to 1. I need 1 to many. It doesn't matter which document is in which index. We can use alias for that.

---

<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 17, 2023, 2:15pm UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/2 "2023-05-17T14:15:03Z")

</div>

Why multiple indices and not a single index with a larger number of primary shards?

---

<div class="post-metadata">

**Author:** ![elasticvakif](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@elasticvakif](https://discuss.elastic.co/u/elasticvakif)\
**Post date:** [May 18, 2023, 6:21am UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/3 "2023-05-18T06:21:31Z")

</div>

My index has 6 shards and our cluster has 3 nodes. If i make it 12 or 24 shards, will my problems which are slowness and getting timeout solved ?

---

<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 18, 2023, 6:58am UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/4 "2023-05-18T06:58:18Z")

</div>

That would depend on what is causing the slowness and timeouts. Querying one index with 12 shards is the same as querying 4 indices with 3 shards each - it is the shard count that matters, so I do not see any point in splitting to multiple indices.

What is the nature of the slowness and timeouts you are experiencing? When does it happen? What type of queries are you using? What is the load on the cluster?

What is the specification of the cluster with respect to node count, CPU, RAM and type of storage?

---

<div class="post-metadata">

**Author:** ![elasticvakif](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@elasticvakif](https://discuss.elastic.co/u/elasticvakif)\
**Post date:** [May 18, 2023, 8:53am UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/5 "2023-05-18T08:53:40Z")

</div>

Actually i tought we can use 4 indexes with 12 shards each. Especially deleting and searching documents takes long time and we get 503 error sometimes.

In log files, there are lots of removing and adding nodes again and again.

I checked the memory with nodes/stats API, it says free memory is %18.

Maybe this is the reason. I will increase memory and CPU.

---

<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 18, 2023, 8:57am UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/6 "2023-05-18T08:57:19Z")

</div>

> [@elasticvakif](#):
>
> Actually i tought we can use 4 indexes with 12 shards each.

That would be equivalent to a single index with 48 shards.

Before making any changes like this I would recommend identifying what the issue likely is. It would help if you answered the questions I asked. If would also be useful to know the following:

- Which version of Elasticsearch are you using?
- Do you have monitoring enabled?
- What is the query and indexing load on the cluster?
- What is the size of the indexed data on disk?

---

<div class="post-metadata">

**Author:** ![elasticvakif](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@elasticvakif](https://discuss.elastic.co/u/elasticvakif)\
**Post date:** [May 18, 2023, 12:07pm UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/7 "2023-05-18T12:07:19Z")

</div>

I see, thanks for advices,

Elasticsearch version 6.2.1  
We use Kibana,

```auto

GET /_cluster/allocation/explain

{
  "index": ".kibana",
  "shard": 0,
  "primary": false,
  "current_state": "unassigned",
  "unassigned_info": {
    "reason": "NODE_LEFT",
    "at": "2023-05-18T11:26:24.016Z",
    "details": "node_left[W-g1eBunTpSumcDmn_ZOcg]",
    "last_allocation_status": "no_attempt"
  },
  "can_allocate": "throttled",
  "allocate_explanation": "allocation temporarily throttled",
  "node_allocation_decisions": [
    {
      "node_id": "OKHUeN1GTPyA_3RZN3XGGg",
      "node_name": "isvitelkwx03",
      "transport_address": "ip:9300",
      "node_decision": "throttled",
      "deciders": [
        {
          "decider": "throttling",
          "decision": "THROTTLE",
          "explanation": "reached the limit of outgoing shard recoveries [2] on the node [OKHUeN1GTPyA_3RZN3XGGg] which holds the primary, cluster setting [cluster.routing.allocation.node_concurrent_outgoing_recoveries=2] (can also be set via [cluster.routing.allocation.node_concurrent_recoveries])"
        }
      ]
    },

Generally i see this NODE_LEFT and unussigner shard error.

GET _cluster/health

{
  "cluster_name": "clustername",
  "status": "yellow",
  "timed_out": false,
  "number_of_nodes": 3,
  "number_of_data_nodes": 3,
  "active_primary_shards": 179,
  "active_shards": 287,
  "relocating_shards": 0,
  "initializing_shards": 2,
  "unassigned_shards": 69,
  "delayed_unassigned_shards": 57,
  "number_of_pending_tasks": 1,
  "number_of_in_flight_fetch": 0,
  "task_max_waiting_in_queue_millis": 0,
  "active_shards_percent_as_number": 80.16759776536313
}

GET _cat/shards?h=index,shard,prirep,state,unassigned.reason

index_name 2 r INITIALIZING NODE_LEFT
index_name 2 p STARTED      
index_name 5 p STARTED      
index_name 5 r UNASSIGNED NODE_LEFT

```

---

<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:** [May 18, 2023, 12:07pm UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/8 "2023-05-18T12:07:20Z")

</div>

Elasticsearch version 6.2.1 is [EOL](https://www.elastic.co/support/eol) and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<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 15, 2023, 12:07pm UTC](https://discuss.elastic.co/t/reindex-1-index-to-multiple-indexes/333667/9 "2023-06-15T12:07:56Z")

</div>

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