当我使用 terrier 3.5 为集合构建倒排索引时。首先,我使用“./bin/trec_setup.sh var/corpus”,其次,我使用“./bin/trec_terrier.sh -i -j”,但出现无法加载称为元索引的索引结构的错误。
Setting TERRIER_HOME to /home/mao/Desktop/terrier-3.5
INFO - TRECCollection read collection specification (1 files)
INFO - Processing var/collection/sogou/sogou
INFO - Structure meta reading lookup file into memory
INFO - Structure meta reading reverse map for key docno directly from disk
ERROR - Couldn't load an index structure called meta
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.terrier.structures.Index.loadIndexStructure(Index.java:421)
at org.terrier.structures.Index.getIndexStructure(Index.java:330)
at org.terrier.structures.Index.loadIndices(Index.java:252)
at org.terrier.structures.Index.<init>(Index.java:189)
at org.terrier.structures.Index.createIndex(Index.java:659)
at org.terrier.applications.TRECIndexing.createSinglePass(TRECIndexing.java:204)
at org.terrier.applications.TrecTerrier.run(TrecTerrier.java:382)
at org.terrier.applications.TrecTerrier.applyOptions(TrecTerrier.java:564)
at org.terrier.applications.TrecTerrier.main(TrecTerrier.java:235)
Caused by: java.io.FileNotFoundException: /home/mao/Desktop/terrier-3.5/var/index/data.meta-0.fsomapfile (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:122)
at org.terrier.utility.io.LocalFileSystem$LocalRandomAccessFile.<init>(LocalFileSystem.java:54)
at org.terrier.utility.io.LocalFileSystem.openFileRandom(LocalFileSystem.java:116)
at org.terrier.utility.Files.openFileRandom(Files.java:354)
at org.terrier.structures.collections.FSOrderedMapFile.<init>(FSOrderedMapFile.java:571)
at org.terrier.structures.CompressingMetaIndex.loadIndex(CompressingMetaIndex.java:1194)
at org.terrier.structures.CompressingMetaIndex.<init>(CompressingMetaIndex.java:835)
... 13 more
A problem occurred: java.lang.NullPointerException
java.lang.NullPointerException
at org.terrier.applications.TRECIndexing.createSinglePass(TRECIndexing.java:205)
at org.terrier.applications.TrecTerrier.run(TrecTerrier.java:382)
at org.terrier.applications.TrecTerrier.applyOptions(TrecTerrier.java:564)
at org.terrier.applications.TrecTerrier.main(TrecTerrier.java:235)
mao@ubuntu:~/Desktop/terrier-3.5$ ./bin/trec_terrier.sh --printmeta
Setting TERRIER_HOME to /home/mao/Desktop/terrier-3.5
ERROR - Couldn't load an index structure called meta-inputstream
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.terrier.structures.Index.loadIndexStructure(Index.java:421)
at org.terrier.structures.Index.getIndexStructureInputStream(Index.java:449)
at org.terrier.structures.IndexUtil.printMetaIndex(IndexUtil.java:328)
at org.terrier.applications.TrecTerrier.run(TrecTerrier.java:412)
at org.terrier.applications.TrecTerrier.applyOptions(TrecTerrier.java:564)
at org.terrier.applications.TrecTerrier.main(TrecTerrier.java:235)
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197)
at java.io.DataInputStream.readLong(DataInputStream.java:416)
at org.terrier.structures.CompressingMetaIndex$InputStream.<init>(CompressingMetaIndex.java:702)
at org.terrier.structures.CompressingMetaIndex$InputStream.<init>(CompressingMetaIndex.java:730)
... 10 more
A problem occurred: java.lang.NullPointerException
java.lang.NullPointerException
at org.terrier.structures.IndexUtil.printMetaIndex(IndexUtil.java:329)
at org.terrier.applications.TrecTerrier.run(TrecTerrier.java:412)
at org.terrier.applications.TrecTerrier.applyOptions(TrecTerrier.java:564)
at org.terrier.applications.TrecTerrier.main(TrecTerrier.java:235)