0

I created a new index putting the following settings:

"settings": {
            "index": {
                "number_of_shards": "5",
                "blocks": {
                    "read_only_allow_delete": "false" // null was tested also
                },
                "analysis": {
                    "filter": {
                        "autocomplete_filter": {
                            "type": "edge_ngram",
                            "min_gram": "1",
                            "max_gram": "20"
                        }
                    },
                    "analyzer": {
                        "autocomplete": {
                            "filter": [
                                "lowercase",
                                "autocomplete_filter"
                            ],
                            "type": "custom",
                            "tokenizer": "standard"
                        }
                    }
                },
                "number_of_replicas": "2"
            }
        }

now when I index a new document for the first time using postman it is indexed correctly, but the next document issues an error, after the error I sent a GET request and I noticed that the settings became:

"settings": {
            "index": {
                "number_of_shards": "5",
                "blocks": {
                    "read_only_allow_delete": "true"
                },
                "analysis": {
                    "filter": {
                        "autocomplete_filter": {
                            "type": "edge_ngram",
                            "min_gram": "1",
                            "max_gram": "20"
                        }
                    },
                    "analyzer": {
                        "autocomplete": {
                            "filter": [
                                "lowercase",
                                "autocomplete_filter"
                            ],
                            "type": "custom",
                            "tokenizer": "standard"
                        }
                    }
                },
                "number_of_replicas": "2"
            }
        }

So how come the "read_only_allow_delete" is set to true after the first document being indexed. I verified the settings after creating the index and it was not false The error:

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

1 Answer 1

1

Check if your elasticsearch cluster disk space is running low. See the flood stage watermark setting on this page

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.