Problem while using shrink api

I was following this doc for decreasing shards but GET /_cluster/allocation/explain shows
"explanation" : """node does not match index setting [index.routing.allocation.require] filters [_name:"ed1"]"""
I want to shrink an index name called elastalert_status earlier it has 3 primary and 1 replica shard
now i want to have 2 shards(1P+1R)
I ran the following commands

PUT elastalert_status/_settings
  "settings": {
      "index.routing.allocation.require._name": "ed1",
      "index.blocks.write": true,
       "index.number_of_replicas": 0     
POST /elastalert_status/_shrink/elastalert_status_1
  "settings": {
     "index.number_of_replicas": 1,
    "index.number_of_shards": 1,
    "index.codec": "best_compression"

New index name is elastalert_status_1
GET /_cat/indices/elastalert_status_1?v&pretty

yellow open   elastalert_status_1 BShehE1bRdO3DRlOHs1yEQ   1   1     389798            0    266.3mb        266.3mb```
The size of old index was 281.7mb

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