elasticsearch阻止使用PostMan插入数据

时间:2018-12-10 06:33:02

标签: elasticsearch

我创建了一个具有以下设置的新索引:

"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"
            }
        }

现在,当我首次使用邮递员为新文档建立索引时,它已正确建立了索引,但是下一个文档发出了错误,在出现错误后,我发送了GET请求,并注意到设置变为:

"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"
            }
        }

因此,在为第一个文档建立索引后,如何将"read_only_allow_delete"设置为true。 创建索引后,我验证了设置,但它不是false 错误:

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 个答案:

答案 0 :(得分:1)

检查您的elasticsearch集群磁盘空间是否不足。请参阅this页上的洪水阶段水印设置