在lucene中加入mmseg分词器错误

mmseg4j-1.8.2

Lucene-3.0.2

出现如下错误:

 

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:821)

at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:797)

at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1981)

at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1955)

at ict.ncic.Index.fileindexBuilder(Index.java:134)

at ict.ncic.Index.subindexBuilder(Index.java:70)

at ict.ncic.Index.indexBuilder(Index.java:53)

at ict.ncic.Index.main(Index.java:36)

lucene.org资料:
  • 2.9.3 is a bugfix release for the Lucene Java 2.x series, based on Java 1.4.
  • 3.0.2 has the same bug fix level but is for the Lucene Java 3.x series, based on Java 5.

New users of Lucene are advised to use version 3.0.2 for new developments, because it has a clean, type-safe API.

Solution:
使用Lucene2.9.3.
Ok.

你可能感兴趣的:(java,thread,exception,Lucene)