org.terrier.structures
Class BlockInvertedIndex
java.lang.Object
org.terrier.structures.BitPostingIndex
org.terrier.structures.InvertedIndex
org.terrier.structures.BlockInvertedIndex
- All Implemented Interfaces:
- java.io.Closeable, IndexConfigurable, PostingIndex<BitIndexPointer>
public class BlockInvertedIndex
- extends InvertedIndex
- implements IndexConfigurable
This class implements the block field inverted
index for performing retrieval.
- Author:
- Douglas Johnson, Craig Macdonald et al.
Method Summary |
int[][] |
getDocuments(BitIndexPointer pointer)
Returns a 2D array containing the document ids,
the term frequencies, the field scores the block frequencies and
the block ids for the given documents. |
void |
setIndex(Index i)
let it know which index to use |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentBlockCountDelta
protected int DocumentBlockCountDelta
BlockInvertedIndex
public BlockInvertedIndex(Index index,
java.lang.String structureName,
DocumentIndex _doi,
java.lang.Class<? extends IterablePosting> postingClass)
throws java.io.IOException
- Constructs an instance of the class with
- Parameters:
index
- structureName
- _doi
- postingClass
-
- Throws:
java.io.IOException
BlockInvertedIndex
public BlockInvertedIndex(Index index,
java.lang.String structureName,
DocumentIndex doi)
throws java.io.IOException
- Constructs an instance of the class with
- Parameters:
index
- structureName
- doi
-
- Throws:
java.io.IOException
BlockInvertedIndex
public BlockInvertedIndex(Index index,
java.lang.String structureName)
throws java.io.IOException
- Constructs an instance of the class with
- Parameters:
index
- structureName
-
- Throws:
java.io.IOException
setIndex
public void setIndex(Index i)
- let it know which index to use
- Specified by:
setIndex
in interface IndexConfigurable
- Parameters:
i
- Index object to use
getDocuments
public int[][] getDocuments(BitIndexPointer pointer)
- Returns a 2D array containing the document ids,
the term frequencies, the field scores the block frequencies and
the block ids for the given documents.
- Overrides:
getDocuments
in class InvertedIndex
- Parameters:
pointer
- start byte and bit offset of the postings in the inverted file,
together with number of postings to expect
- Returns:
- int[][] the five dimensional [5][] array containing
the document ids, frequencies, field scores and block
frequencies, while the last vector contains the
block identifiers and it has a different length from
the document identifiers.
Terrier 3.5. Copyright © 2004-2011 University of Glasgow