我根据找到的指令here下载Lucene App Engine (LAE) jar from maven。在下载了罐子并将其导入到我的项目,我希望下面的几行工作,但我正在编译IndexWriterConfig
luceneappengine罐子是完整的还是我需要下载更多罐子
GaeDirectory directory = new GaeDirectory();//create a default index
IndexWriterConfig config = GaeLuceneUtil.getIndexWriterConfig(LUCENE_VERSION, analyzer);//get configuration
IndexWriter w = new IndexWriter(directory, config);//get the writer
/* now use Apache Lucene like you're used to */
而且错误,我应该从analyzer
? Eclipse没有为它找到类。除了luceneappengine之外,还必须导入lucene吗?
该项目声称有一个示例与源代码,但我无法打开示例的源代码来查看代码。当我点击源代码时,它会循环回到网站。
在示例代码中,第118-150行不编译。是因为我在使用Version.LUCENE_5_0_0吗? – 2015-04-04 22:18:49
更具体地说'QueryParser'无法解析。在行'StandardAnalyzer分析仪=新的StandardAnalyzer(); \t \t \t QueryRescorer的QueryParser =新的QueryParser(LuceneWorker.LUCENE_VERSION, “标题”,分析仪);' – 2015-04-04 22:20:20
的QueryParser的存在了不止,在该示例中它是在第15行,'进口org.apache.lucene.queryparser.classic导入。 QueryParser;' - 你说这行成功就好,但你不能**使用** QueryParser?! – 2015-04-04 23:37:20