com.sun.labs.minion.indexer.entry
Interface QueryEntry

All Superinterfaces:
java.lang.Comparable, Entry
All Known Implementing Classes:
BaseEntry, CasedDFOEntry, CasedEntry, CasedIDEntry, ClusterEntry, ConceptEntry, DFOEntry, DocKeyEntry, FeatureEntry, FieldedDocKeyEntry, IDEntry, IDFreqEntry, IDWEntry, MPCasedDFOEntry, SinglePostingsEntry, TermStatsEntry

public interface QueryEntry
extends Entry

An entry that is returned from dictionaries during querying operations.


Method Summary
 void decodePostingsInfo(ReadableBuffer b, int pos)
          Decodes the postings information associated with this entry.
 boolean hasFieldInformation()
          Indicates whether the postings associated with this entry have field information.
 boolean hasPositionInformation()
          Indicates whether the postings associated with this entry have position information.
 PostingsIterator iterator(PostingsIteratorFeatures features)
          Gets an iterator that will iterate through the postings associated with this entry.
 void readPostings()
          Reads the postings data for this entry.
 void setPostingsInput(PostingsInput[] postIn)
          Sets the inputs that will be used to read postings for this entry.
 
Methods inherited from interface com.sun.labs.minion.indexer.entry.Entry
getEntry, getEntry, getID, getMaxFDT, getN, getName, getNumChannels, getPartition, getTotalOccurrences, setDictionary, setID, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

setPostingsInput

void setPostingsInput(PostingsInput[] postIn)
Sets the inputs that will be used to read postings for this entry. This allows us to use different input implementation strategies at different times.

Parameters:
postIn - The channels from which the postings data can be read.

decodePostingsInfo

void decodePostingsInfo(ReadableBuffer b,
                        int pos)
Decodes the postings information associated with this entry.

Parameters:
b - The buffer containing the encoded postings information.
pos - The position in b where the postings information can be found.

readPostings

void readPostings()
                  throws java.io.IOException
Reads the postings data for this entry. This method must load all available postings information, since this will be used at dictionary merge time to append postings from one entry onto another.

Throws:
java.io.IOException - if there is any error reading the postings.

hasPositionInformation

boolean hasPositionInformation()
Indicates whether the postings associated with this entry have position information.


hasFieldInformation

boolean hasFieldInformation()
Indicates whether the postings associated with this entry have field information.


iterator

PostingsIterator iterator(PostingsIteratorFeatures features)
Gets an iterator that will iterate through the postings associated with this entry.

Parameters:
features - A set of features that the iterator must support.
Returns:
An iterator for the postings.