TopCoreDocCollector类型中的java方法create(int,int)不能用于参数(int,boolean)
目前我正在与Apache Lucene合作,我在本节中遇到错误:
TopScoreDocCollector collector = TopScoreDocCollector.create(hitsPerPage, true);
上面写着:
"The method create (int, int) in the type TopScoreDocCollector is not capable for the arguments (int, boolean)"
这是我的完整代码,我从HelloLucene.java得到了这个,稍加修改
我使用Eclipse和ApacheLucene 8.4.0。我不知道,因为我太困惑了。谢谢
# 1 楼答案
这就是它所说的意思。 在ApacheLucene 8.4.0中,没有一个将(int,boolean)作为输入的create方法。 检查API以了解您的版本: http://lucene.apache.org/core/8_4_0/core/org/apache/lucene/search/TopScoreDocCollector.html