gpt4 book ai didi

Elasticsearch read_only_allow_delete 自动设置

转载 作者:行者123 更新时间:2023-11-29 02:43:37 24 4
gpt4 key购买 nike

我对 Elasticsearch 有疑问。我尝试了以下方法:

 $ curl -XPUT -H "Content-Type: application/json" \
http://localhost:9200/_all/_settings \
-d '{"index.blocks.read_only_allow_delete": false}'

我的设置:

"settings": {
"index": {
"number_of_shards": "5",
"blocks": {
"read_only_allow_delete": "true"
},
"provided_name": "new-index",
"creation_date": "1515433832692",
"analysis": {
"filter": {
"ngram_filter": {
"type": "ngram",
"min_gram": "2",
"max_gram": "4"
}
},
"analyzer": {
"ngram_analyzer": {
"filter": [
"ngram_filter"
],
"type": "custom",
"tokenizer": "standard"
}
}
},
"number_of_replicas": "1",
"uuid": "OSG7CNAWR9-G3QC75K4oQQ",
"version": {
"created": "6010199"
}
}
}

当我检查设置时,它看起来不错,但只有几秒钟 (3-5),它仍然设置为 true。我不能添加新元素和查询任何东西,只有 _searchdelete

有人知道如何解决这个问题吗?

注意:我使用的是 Elasticsearch 版本:6.1.1

最佳答案

当硬盘空间不足时,Elasticsearch 会自动设置 "read_only_allow_delete": "true"

找到占用您存储空间的文件并删除/移动它们。一旦您有足够的可用存储空间,通过 Kibana 中的开发工具运行以下命令:

PUT your_index_name/_settings
{
"index": {
"blocks": {
"read_only_allow_delete": "false"
}
}
}

(通过终端):

$ curl -XPUT -H "Content-Type: application/json" \
http://localhost:9200/_all/_settings \
-d '{"index.blocks.read_only_allow_delete": false}'

如您的问题所述。

关于Elasticsearch read_only_allow_delete 自动设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48155774/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com