org.terrier.structures
Class TermPayloadInvertedIndex<PAYLOAD>
java.lang.Object
org.terrier.structures.BitPostingIndex
org.terrier.structures.InvertedIndex
org.terrier.structures.TermPayloadInvertedIndex<PAYLOAD>
- Type Parameters:
PAYLOAD - the payload type
- All Implemented Interfaces:
- Closeable, org.terrier.structures.IndexConfigurable, org.terrier.structures.PostingIndex<org.terrier.structures.BitIndexPointer>
- Direct Known Subclasses:
- NNInvertedIndex, PositionInvertedIndex
public class TermPayloadInvertedIndex<PAYLOAD>
- extends org.terrier.structures.InvertedIndex
- implements org.terrier.structures.IndexConfigurable
This class implements the inverted index for performing retrieval.
The inverted index contains payload data for each term occurrence.
- Author:
- Jonathon Hare
| Fields inherited from class org.terrier.structures.InvertedIndex |
doi, FIELD_LOAD_FACTOR, logger, NORMAL_LOAD_FACTOR |
| Fields inherited from class org.terrier.structures.BitPostingIndex |
fieldCount, file, index, postingImplementation |
|
Constructor Summary |
TermPayloadInvertedIndex(org.terrier.structures.Index index,
String structureName,
org.terrier.structures.DocumentIndex _doi,
Class<? extends org.terrier.structures.postings.IterablePosting> postingClass)
Construct the inverted index. |
| Methods inherited from class org.terrier.structures.InvertedIndex |
getBitFiles, getDocuments |
| Methods inherited from class org.terrier.structures.BitPostingIndex |
close |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentBlockCountDelta
protected int DocumentBlockCountDelta
payloadConf
protected TermPayloadCoordinator<PAYLOAD> payloadConf
TermPayloadInvertedIndex
public TermPayloadInvertedIndex(org.terrier.structures.Index index,
String structureName,
org.terrier.structures.DocumentIndex _doi,
Class<? extends org.terrier.structures.postings.IterablePosting> postingClass)
throws IOException
- Construct the inverted index.
- Parameters:
index - the index to which this inverted index belongsstructureName - the name of the inverted index structure_doi - the document indexpostingClass - the class to use for iterating postings
- Throws:
IOException
setIndex
public void setIndex(org.terrier.structures.Index i)
- let it know which index to use
- Specified by:
setIndex in interface org.terrier.structures.IndexConfigurable
getDocuments
public int[][] getDocuments(org.terrier.structures.BitIndexPointer pointer)
-
- Overrides:
getDocuments in class org.terrier.structures.InvertedIndex
getPayloads
public gnu.trove.TIntObjectHashMap<PAYLOAD[]> getPayloads(org.terrier.structures.BitIndexPointer pointer)
- For a given postings list return a map of docid -> payloads_of_each_term_instance
- Parameters:
pointer - postings list
- Returns:
- document->payloads mapping
getPayloadConfig
public TermPayloadCoordinator<PAYLOAD> getPayloadConfig()
- Get the payload coordinator
- Returns:
- the payload coordinator
getPostings
public TermPayloadIterablePosting<PAYLOAD> getPostings(org.terrier.structures.BitIndexPointer pointer)
throws IOException
- Specified by:
getPostings in interface org.terrier.structures.PostingIndex<org.terrier.structures.BitIndexPointer>- Overrides:
getPostings in class org.terrier.structures.InvertedIndex
- Throws:
IOException
print
public void print()
- Overrides:
print in class org.terrier.structures.InvertedIndex
Copyright © 2011 The University of Southampton. All Rights Reserved.