Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Lucene ElasticSearch方面计数与项目总数不匹配_Lucene_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Nest - Fatal编程技术网 elasticsearch,nest,Lucene,elasticsearch,Nest" /> elasticsearch,nest,Lucene,elasticsearch,Nest" />

Lucene ElasticSearch方面计数与项目总数不匹配

Lucene ElasticSearch方面计数与项目总数不匹配,lucene,elasticsearch,nest,Lucene,elasticsearch,Nest,我的搜索索引中有98个文档。当我在没有过滤器的情况下进行方面搜索时,方面计数与该术语索引中的项数不匹配。如果我将facet集合设置为当前文档数98,那么facet计数将返回该术语的正确项数。下面是facet搜索的json 未返回正确数量的项目 { "facets": { "brand": { "terms": { "field": "brand", "all_terms": true } }, "global":

我的搜索索引中有98个文档。当我在没有过滤器的情况下进行方面搜索时,方面计数与该术语索引中的项数不匹配。如果我将facet集合设置为当前文档数98,那么facet计数将返回该术语的正确项数。下面是facet搜索的json

未返回正确数量的项目

{
  "facets": {
    "brand": {
      "terms": {
        "field": "brand",
        "all_terms": true
      }
    },
    "global": true
  }
}
{
  "facets": {
    "brand": {
      "terms": {
        "field": "brand",
        "all_terms": true,
        "size": 98
      }
    },
    "global": true
  }
}
是否返回正确数量的项目

{
  "facets": {
    "brand": {
      "terms": {
        "field": "brand",
        "all_terms": true
      }
    },
    "global": true
  }
}
{
  "facets": {
    "brand": {
      "terms": {
        "field": "brand",
        "all_terms": true,
        "size": 98
      }
    },
    "global": true
  }
}

这是一个已知的尚未解决的问题。有关更多详细信息,请参阅问题。

您所说的“正确”是什么意思?这确实是我看到的一个错误。我将该索引的碎片数更改为1,它开始提供正确的总数。谢谢