lucene的版本问题!
org.apache.lucene.index.CorruptIndexException: Unknown format version: -7
我在研究lucene实例的时候,报这个错误,我在baidu上查了下,是版本问题,可是我已经换成了2.2版本了啊!
而且代码里么没有报错,编译通过啊!
[解决办法]
That exception means your index was written with a newer version of
Lucene than the version you are using to open the IndexReader.
It looks like you used the unreleased (2.3 dev) version of Lucli from
the Lucene trunk and then went back to an older Lucene JAR (maybe 2.2?)
for accessing it? In general writing an index with a newer version
of Lucene and then trying to access it using an older version of Lucene
doesn't work (whereas the opposite does).
I'm afraid you either have to switch to 2.3-dev for reading your index
(but beware it could have sneaky bugs ...), or, rebuild your index with
the 2.2 version of Lucene and use the 2.2 Lucli in the future.
Mike
============================
http://topic.csdn.net/u/20080303/10/d38df587-5813-4b07-8ccd-1a016f07448e.html
[解决办法]
http://topic.csdn.net/u/20080303/10/d38df587-5813-4b07-8ccd-1a016f07448e.html
就是这句
That exception means your index was written with a newer version of
Lucene than the version you are using to open the IndexReader.