org.apache.lucene.analysis.TokenStream.incrementToken()Z

在使用lucene3与IKAnalyzer集成的时候可能会出现以下错误:

Exception in thread "main" java.lang.AbstractMethodError: org.apache.lucene.analysis.TokenStream.incrementToken()Z
at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:137)
at org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:246)
at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:774)
at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:752)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1932)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1906)



原因是:IKAnalyzer以前发布的jar与lucene3不兼容。兼容版本如附件图

你可能感兴趣的:(lucene)