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

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

public interface IndexEntry
extends Entry

An entry that is used in dictionaries that are built while indexing documents.


Method Summary
 void add(Occurrence o)
          Adds an occurrence to this index entry.
 void append(QueryEntry qe, int start, int[] idMap)
          Appends the postings from another entry onto this one.
 void encodePostingsInfo(WriteableBuffer b)
          Encodes any information associated with the postings onto the given buffer.
 void setID(int id)
          Sets the ID associated with this entry.
 void setName(java.lang.Object name)
          Sets the name of this entry.
 boolean writePostings(PostingsOutput[] out, int[] idMap)
          Writes the postings associated with this entry to some or all of the given channels.
 
Methods inherited from interface com.sun.labs.minion.indexer.entry.Entry
getEntry, getEntry, getID, getMaxFDT, getN, getName, getNumChannels, getPartition, getTotalOccurrences, setDictionary
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

setName

void setName(java.lang.Object name)
Sets the name of this entry.

Specified by:
setName in interface Entry
Parameters:
name - The name that we wish the entry to have.

setID

void setID(int id)
Sets the ID associated with this entry.

Specified by:
setID in interface Entry
Parameters:
id - The id to use for this entry.

add

void add(Occurrence o)
Adds an occurrence to this index entry.

Parameters:
o - The occurrence to add.

writePostings

boolean writePostings(PostingsOutput[] out,
                      int[] idMap)
                      throws java.io.IOException
Writes the postings associated with this entry to some or all of the given channels.

Parameters:
out - The outputs to which we will write the postings.
idMap - A map from the IDs currently used in the postings to the IDs that should be used when the postings are written to disk. This may be null, in which case no remapping will occur.
Returns:
true if postings were written, false otherwise
Throws:
java.io.IOException - if there is any error writing the postings.

append

void append(QueryEntry qe,
            int start,
            int[] idMap)
Appends the postings from another entry onto this one. This is used when merging dictionaries.

Parameters:
qe - The entry that we want to append onto this one.
start - The new starting ID for the partition that the entry was drawn from.
idMap - A map from old IDs in the given postings to new IDs with gaps removed for deleted data. If this is null, then there are no deleted documents.

encodePostingsInfo

void encodePostingsInfo(WriteableBuffer b)
Encodes any information associated with the postings onto the given buffer.

Parameters:
b - The buffer onto which the postings information should be encoded. The buffer will be positioned to the correct spot for the encoding.