我根據找到的指令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