【发布时间】:2016-04-11 07:37:23
【问题描述】:
我正在使用下面的代码进行搜索,但某些方法显示错误;
FSDirectory.open(new File(indexDirectoryPath));
writer = new IndexWriter(indexDirectory,
new StandardAnalyzer(),true,
IndexWriter.MaxFieldLength.UNLIMITED);
在此代码中打开并且 MaxFieldLength 显示错误。我正在使用 lucene 6.0.0。
open() 方法显示错误
FSDirectory 类型中的方法 open(Path) 不适用于 参数(文件)
和 MaxFieldLength 显示:
MaxFieldLength 无法解析或不是字段
我使用了这里提供的代码:
http://www.tutorialspoint.com/lucene/lucene_first_application.htm
【问题讨论】:
-
您可以查看 javadoc 了解不同版本的 Lucene 并找出我猜的问题。