0

我正在使用 mahout 发行版 0.6 和 solr 4.2,我想为 solr 索引生成 mahout 向量,但该命令给出了兼容性错误。为什么我会收到此错误以及如何解决?

~/mahout$ bin/mahout lucene.vector --dir /home/newscontext/solr/solr-4.2.0/example/solr/collection1/data/index --output tmp/part-out.vec --field 0 --dictOut /tmp/dict.out --norm 2
MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
no HADOOP_HOME set, running locally
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/newscontext/mahout/examples/target/mahout-examples-0.6-job.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/newscontext/mahout/examples/target/dependency/slf4j-jcl-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/newscontext/mahout/examples/target/dependency/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Exception in thread "main" org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported in file 'segments_2': 1071082519 (needs to be between -1 and -11). This version of Lucene only supports indexes created with release 3.0 and later.
    at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:275)
    at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:79)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:754)
    at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:75)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:421)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:281)
    at org.apache.mahout.utils.vectors.lucene.Driver.dumpVectors(Driver.java:84)
    at org.apache.mahout.utils.vectors.lucene.Driver.main(Driver.java:250)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
    at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
    at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:188)
4

1 回答 1

1

0.6 是旧的。即使是当前版本的 0.7,也已经很老了。我确信他们不使用相当新的 Lucene 4.2。事实上,它可能在 Lucene 2.x 上,因为它是 2 多年前发布的。使用来自 SVN 的最新版本,而不是 0.6。

于 2013-03-25T15:09:16.697 回答