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 is old. Even 0.7, the current release, is pretty old. I am sure that they don't use Lucene 4.2, which is quite new. In fact it's probably on Lucene 2.x since it was released 2+ years ago. Use the latest from SVN, not 0.6.

于 2013-03-25T15:09:16.697 に答える