注:terrier3.0不支持建立meta index,如果需要在建立meta index,需要使用terrier3.5.
在使用terrier3.5建立索引的时候,需要在.properties文件中设置一下4个属性,其中最后一个可以不进行设置:
- (tagset).propertytags - list of tags to add to the meta index rather than to index. Tags are assumed to be IN ORDER after the docid.
- indexer.meta.forward.keys - list of keys to add to the meta index, remember to put any property tags here as well.
- indexer.meta.forward.keylens - lengths of each of the the meta keys, remember to put the lengths of the property tags here as well.
- indexer.meta.reverse.keys - Comma-delimited list of document attributes that uniquely denote a document. These mean that given a document attribute value, a single document can be identified.
示例如下:
TrecDocTags.propertytags=DOCNO,AUTHOR,TIME
indexer.meta.forward.keys=docno,author,time(注意此处必须小写,因为这些属性要传到hadoop进行处理)
indexer.meta.forward.keylens=20,20,50
indexer.meta.reverse.keys=docno可以参考的URL:
http://terrier.org/docs/v3.5/configure_indexing.html
http://terrier.org/docs/v3.5/javadoc/org/terrier/indexing/TRECCollection.html