|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.entry.BaseEntry
com.sun.labs.minion.indexer.entry.TermStatsEntry
public class TermStatsEntry
An entry for the global term statistics dictionary. These entries will not have any postings.
| Field Summary |
|---|
| Fields inherited from class com.sun.labs.minion.indexer.entry.BaseEntry |
|---|
dict, id, name, postIn |
| Constructor Summary | |
|---|---|
TermStatsEntry()
|
|
TermStatsEntry(java.lang.String name)
|
|
| 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 |
decodePostingsInfo(ReadableBuffer b,
int pos)
Decodes the postings information associated with this entry. |
void |
encodePostingsInfo(WriteableBuffer b)
Encodes any information associated with the postings onto the given buffer. |
Entry |
getEntry()
Gets a new entry that contains a copy of the data in this entry. |
Entry |
getEntry(java.lang.Object name)
Gets a new entry with the given name. |
int |
getMaxFDT()
Gets the maximum document term frequency from this entry. |
int |
getN()
Gets the number of postings associated with this entry. |
int |
getNumChannels()
Returns the number of channels needed to store or retrieve the postings for this entry type. |
TermStatsImpl |
getTermStats()
|
long |
getTotalOccurrences()
Gets the total number of occurrences 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 |
setTermStats(TermStatsImpl ts)
|
boolean |
writePostings(PostingsOutput[] out,
int[] idMap)
Writes the postings associated with this entry to some or all of the given channels. |
| Methods inherited from class com.sun.labs.minion.indexer.entry.BaseEntry |
|---|
compareTo, getID, getName, getPartition, setDictionary, setID, setName, setPostingsInput, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TermStatsEntry()
public TermStatsEntry(java.lang.String name)
| Method Detail |
|---|
public void setTermStats(TermStatsImpl ts)
public TermStatsImpl getTermStats()
public void add(Occurrence o)
IndexEntry
o - The occurrence to add.
public boolean writePostings(PostingsOutput[] out,
int[] idMap)
throws java.io.IOException
IndexEntry
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.
java.io.IOException - if there is any error writing the
postings.
public void append(QueryEntry qe,
int start,
int[] idMap)
IndexEntry
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.public void encodePostingsInfo(WriteableBuffer b)
IndexEntry
b - The buffer onto which the postings information should be
encoded. The buffer will be positioned to the correct spot for the
encoding.public Entry getEntry(java.lang.Object name)
Entry
name - the name that we want to give the entry.
public Entry getEntry()
Entry
public int getN()
Entry
public long getTotalOccurrences()
EntryAt the moment, this is only really useful for entries from the main dictionary for a partition.
public int getMaxFDT()
Entry
public int getNumChannels()
Entry
public void decodePostingsInfo(ReadableBuffer b,
int pos)
QueryEntry
b - The buffer containing the encoded postings information.pos - The position in b where the postings
information can be found.
public void readPostings()
throws java.io.IOException
QueryEntry
java.io.IOException - if there is any error reading the
postings.public boolean hasPositionInformation()
QueryEntry
public boolean hasFieldInformation()
QueryEntry
public PostingsIterator iterator(PostingsIteratorFeatures features)
QueryEntry
features - A set of features that the iterator must support.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||