gpt4 book ai didi

elasticsearch - Elasticsearch:_count给出奇怪的结果

转载 作者:行者123 更新时间:2023-12-03 02:09:38 25 4
gpt4 key购买 nike

$ curl -XGET'http://test.server.es:9200/index/test/_count?pretty'

{
"count" : 229594,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
}
}

再试一次:

$ curl -XGET' http://test.server.es:9200/index/test/_count?pretty'
{
"count" : 226967,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
}
}

“count”值小于先前的_count,但是在两个_count之间没有删除操作。

最佳答案

您的节点之一发疯了,并且碎片不完整。

询问统计信息并找到故障节点:

curl -XGET 'http://localhost:9200/_cluster/nodes/stats'

如果副本设置为至少1,则只需停止该节点,删除数据目录并重新启动该节点。

我的2美分

关于elasticsearch - Elasticsearch:_count给出奇怪的结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16195757/

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