Lucene Sitecore-获取所有索引项

Lucene Sitecore-获取所有索引项,lucene,sitecore,sitecore7,Lucene,Sitecore,Sitecore7,我正在使用lucene search获取按字符串过滤的桶项目,这是我的代码: var innerQuery=newfulltextquery(myString); var hits=searchContext.Search(innerQuery,searchIndex.GetDocumentCount()); 是否有一些查询或其他内容可以让我获取所有索引项?我尝试使用空的“myString”,但出现一个错误,它不能为空。您可以使用Lucene.Net.Search.MatchAllDocsQu

我正在使用lucene search获取按字符串过滤的桶项目,这是我的代码:

var innerQuery=newfulltextquery(myString);
var hits=searchContext.Search(innerQuery,searchIndex.GetDocumentCount());

是否有一些查询或其他内容可以让我获取所有索引项?我尝试使用空的“myString”,但出现一个错误,它不能为空。

您可以使用
Lucene.Net.Search.MatchAllDocsQuery

SearchHits hits=searchContext.Search(新的MatchAllDocsQuery(),int.MaxValue);

谢谢您的帮助:)