代码之家  ›  专栏  ›  技术社区  ›  user3668129

为什么有20个文档存在差异(cat与count)?

  •  0
  • user3668129  · 技术社区  · 3 年前

    我试着比较 count cat 对于文档的数量,我得到了不同的结果:

    GET /my_index/_count 给出:

    {
      "count": 4020199,
      "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
      }
    }
    

    GET /_cat/indices 给出:

    green open my_index 53IuNvZ1T4W_8u1U4bf7kb 1 1 8040418 0 27gb 13.5gb
    

    当我们比较数量时,我们得到:

    8040418 - 4020199 * 2 (one replica) = 20
    

    注:我用过 refresh 命令,没有任何更改。

    那20份遗失文件在哪里?

    0 回复  |  直到 3 年前