# How I can fix is\_write\_index=false in my indexes

**URL:** <https://discuss.elastic.co/t/how-i-can-fix-is-write-index-false-in-my-indexes/223900>\
**Category:** Elasticsearch\
**Created:** [March 17, 2020, 10:27am UTC](https://discuss.elastic.co/t/how-i-can-fix-is-write-index-false-in-my-indexes/223900 "2020-03-17T10:27:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Oceans](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_oceans/32/51452_2.png) [@David\_Oceans](https://discuss.elastic.co/u/David_Oceans)\
**Post date:** [March 17, 2020, 10:27am UTC](https://discuss.elastic.co/t/how-i-can-fix-is-write-index-false-in-my-indexes/223900/1 "2020-03-17T10:27:21Z")

</div>

Hi,

I have some indexes in read-only, I want to put the latest alias in write mode.

But I received this error

```auto
    {
      "error": {
    "root_cause": [
      {
        "type": "cluster_block_exception",
        "reason": "index [gke_stage_plugins-2020.03.16-000081] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
      }
    ],
    "type": "cluster_block_exception",
    "reason": "index [gke_stage_plugins-2020.03.16-000081] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
      },
      "status": 403
    }

```

I've tried with

```auto
    POST /_aliases
    {
        "actions" : [
            {
                "add" : {
                     "index" : "gke_stage_plugins-2020.03.16-000081",
                     "alias" : "gke_stage_plugins",
                     "is_write_index" : true
                }
            }
        ]
    }

```

And

```auto
    PUT gke_stage_plugins-2020.03.16-000081
    {
      "aliases": {
        "datastream": {
          "is_write_index": true
        }
      }
    }

```

What am I doing wrong?

Thank you

---

<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:** [April 14, 2020, 10:27am UTC](https://discuss.elastic.co/t/how-i-can-fix-is-write-index-false-in-my-indexes/223900/2 "2020-04-14T10:27:28Z")

</div>

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