|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.postings.IDPostings
com.sun.labs.minion.indexer.postings.IDFreqPostings
public class IDFreqPostings
A postings class for IDs that have frequencies associated with them.
The format is just like that for IDPostings, except that for
each ID:
| Nested Class Summary | |
|---|---|
class |
IDFreqPostings.IDFreqIterator
|
| Nested classes/interfaces inherited from class com.sun.labs.minion.indexer.postings.IDPostings |
|---|
IDPostings.IDIterator |
| Field Summary | |
|---|---|
protected int |
freq
The frequency of the current ID. |
protected int[] |
freqs
The frequencies for these postings. |
protected static java.lang.String |
logTag
|
protected int |
maxfdt
The maximum frequency. |
protected long |
to
The total number of occurrences in the postings list. |
| Fields inherited from class com.sun.labs.minion.indexer.postings.IDPostings |
|---|
curr, dataStart, ids, lastID, nIDs, nSkips, post, prevID, skipID, skipPos, skipSize |
| Constructor Summary | |
|---|---|
IDFreqPostings()
Makes a postings entry that is useful during indexing. |
|
IDFreqPostings(ReadableBuffer b)
Makes a postings entry that is useful during querying. |
|
IDFreqPostings(ReadableBuffer b,
int offset,
int size)
Makes a postings entry that is useful during querying. |
|
| Method Summary | |
|---|---|
void |
add(Occurrence o)
Adds an occurrence to the postings list. |
protected int |
encode(int id)
Encodes the data for the current ID, and sets up for the next one. |
void |
finish()
Finishes off the encoding our data. |
int |
getMaxFDT()
Gets the maximum frequency in the postings list. |
long |
getTotalOccurrences()
Gets the total number of occurrences in this postings list. |
PostingsIterator |
iterator(PostingsIteratorFeatures features)
Gets an iterator for the postings. |
void |
merge(MergeablePostings mp,
int[] map)
Merges another set of postings with this set of postings. |
protected void |
recodeID(int currID,
int lastID,
PostingsIterator pi)
Re-encodes the data from another postings onto this one. |
| Methods inherited from class com.sun.labs.minion.indexer.postings.IDPostings |
|---|
addSkip, append, append, getBuffers, getLastID, getN, remap, setSkipSize, size, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] freqs
protected int freq
protected long to
protected int maxfdt
protected static java.lang.String logTag
| Constructor Detail |
|---|
public IDFreqPostings()
public IDFreqPostings(ReadableBuffer b)
b - the data read from a postings file.
public IDFreqPostings(ReadableBuffer b,
int offset,
int size)
b - the data read from a postings file.offset - The offset in the buffer from which we should start
reading. If this value is greater than 0, then we need to share the
bit buffer, since we may be part of a larger postings entry that
will need multiple readers.| Method Detail |
|---|
protected int encode(int id)
encode in class IDPostingspublic void add(Occurrence o)
add in interface Postingsadd in class IDPostingso - The occurrence to add.public void finish()
finish in interface Postingsfinish in class IDPostings
protected void recodeID(int currID,
int lastID,
PostingsIterator pi)
recodeID in class IDPostingscurrID - The current IDlastID - The last ID.pi - the iterator of another postings.
public void merge(MergeablePostings mp,
int[] map)
MergeablePostings
merge in interface MergeablePostingsmerge in class IDPostingsmp - the postings to merge into these postings.map - a map from IDs in the postings to IDs in the merged space.public int getMaxFDT()
getMaxFDT in interface PostingsgetMaxFDT in class IDPostingspublic long getTotalOccurrences()
getTotalOccurrences in interface PostingsgetTotalOccurrences in class IDPostingspublic PostingsIterator iterator(PostingsIteratorFeatures features)
iterator in interface Postingsiterator in class IDPostingsfeatures - A set of features that the iterator must support.
null will be
returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||