好的想法是十分钱一打,真正无价的是能够实现这些想法的人。

query_cache的hit_count是如何计算的?

Elasticsearch | 作者 kirito | 发布于2021年03月02日 | 阅读数:1259

//第一次查看
$index/_stats?human
 
"query_cache": { "memory_size": "1.8mb", "memory_size_in_bytes": 1962389, "total_count": 25328, "hit_count": 10468, "miss_count": 14860, "cache_size": 209, "cache_count": 209, "evictions": 0 }
 
//简单filter查询
$index/_search
{
  "from": 0,
  "size": 20,
  "query": {
    "bool": {
      "filter":{
          "term": {
              "is_deleted": 0
          }
      }
    }
  },
  "sort": [
    {
      "published_at": {
        "order": "desc"
      }
    }
  ]
}
 
//第二次查看
$index/_stats?human
 
"query_cache": { "memory_size": "1.8mb", "memory_size_in_bytes": 1962389, "total_count": 25340, "hit_count": 10480, "miss_count": 14860, "cache_size": 209, "cache_count": 209, "evictions": 0 }
 
请问,此处的hit_count是如何计算的?
只查询一次为什么不是+1,尝试了多次,有+12,有+16,还有+17的。
已邀请:

要回复问题请先登录注册