Skip to content

elasticsearch split-index

Split an existing index


Splits an existing index into a new index with more primary shards


elasticsearch split-index
    [--site <site>]
    [--cluster <cluster>]
    --target_index <target_index>
    --shards <shards>


site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default:      Attributes: optional

cluster - (string)

     Name of elastic search cluster
     Example: --cluster "elastic-default"
     Default: elastic-default      Attributes: optional

index - (string)

     Name of the index to be split
     Example: "students"
     Default: _None_      Attributes: required

target_index - (string)

     Name for the split index. This shouldn't already exist in the cluster
     Example: --target_index "students-split"
     Default: _None_      Attributes: required

shards - (int)

     Primary shard count in target index. It must be higher and a multiple of source index primary shards
     Example: --shards 1
     Default: _None_      Attributes: required



! elasticsearch split-index "my_source_index" --shards 2 --target_index "split_index_1"
  "acknowledged": true,
  "shards_acknowledged": true,
  "index": "splittestingindex"

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "elasticsearch"
Service Instance cluster
Object Type "index"
Object ID index

Please see Access Control for details.