|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.indexer.postings.DFOPostings.DFOIterator
public class DFOPostings.DFOIterator
Field Summary | |
---|---|
protected boolean |
allFields
Whether we're doing all of the fields. |
protected int |
cb
The current block in the skip table where we're processing data. |
protected int |
curr
The current ID. |
protected int |
currOff
The current offset. |
protected boolean |
done
Whether we've finished the entry. |
protected int |
field
The ID of a field decoded, if this is the only position in a document. |
protected int[] |
fields
The field data for the current ID. |
protected boolean |
fieldsDecoded
Whether we've decoded the field information for the current ID. |
protected float[] |
fieldWeights
Field weights for the current ID. |
protected int |
freq
The frequency for the current ID. |
protected float[] |
mult
A set of field multipliers to apply. |
protected int |
nFields
The number of fields in the current ID. |
protected boolean |
positionsDecoded
Whether we've decoded the position information for the current ID. |
protected int |
posn
The position that an ID was found, if this is the only position in a document. |
protected int[][] |
posns
The position data. |
protected ReadableBuffer |
rdfo
Our postings as a readable buffer. |
protected ReadableBuffer |
rfnp
|
protected int[] |
searchFields
The fields for which we're supposed to return postings. |
protected WeightingComponents |
wc
|
protected WeightingFunction |
wf
A weighting function to use for the frequencies. |
Constructor Summary | |
---|---|
DFOPostings.DFOIterator(PostingsIteratorFeatures features)
Creates a postings iterator for this postings type. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares this postings iterator to another one. |
void |
decodeFields()
Decodes the field information, leaving the pointer in the buffer at the position information. |
boolean |
equals(java.lang.Object o)
Tests the equality of this postings iterator and another one. |
boolean |
findID(int id)
Finds the given ID in the entry we're iterating through, if it exists. |
int |
get(int[] ids)
Reads a number of IDs into the provided array. |
int |
get(int[] ids,
float[] weights)
Reads a number of IDs and the associated weights into the provided arrays. |
int |
get(int[] ids,
int[] freq)
Reads a number of IDs and frequencies into the provided arrays. |
PostingsIteratorFeatures |
getFeatures()
Gets the features that were used to create this iterator. |
int[] |
getFieldFreq()
Gets the frequencies for the fields for the document at the head of the iterator. |
float[] |
getFieldWeights()
Gets the weights for the fields for the document at the head of the iterator. |
int |
getFreq()
Gets the frequency associated with the current ID. |
int |
getID()
Gets the ID that the iterator is currently pointing at. |
int |
getN()
Gets the number of IDs in this postings list. |
int[][] |
getPositions()
Returns the positions associated with the current ID. |
float |
getWeight()
Gets the weight associated with the current ID, as generated by some weighting function. |
boolean |
next()
Moves to the next ID in this entry. |
protected boolean |
next(int pos,
int id,
int off)
Finds the next document in the postings entry. |
void |
reset()
Resets the iterator to the beginning of the entry. |
protected boolean |
satisfies()
Does the data for the current ID satisfy the requirements of our postings iterator features? |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ReadableBuffer rdfo
protected ReadableBuffer rfnp
protected boolean done
protected int curr
protected int freq
protected int field
protected int posn
protected int currOff
protected int cb
protected WeightingFunction wf
protected WeightingComponents wc
protected float[] mult
protected int[] searchFields
protected boolean allFields
protected int[][] posns
protected int nFields
protected int[] fields
protected float[] fieldWeights
protected boolean fieldsDecoded
protected boolean positionsDecoded
Constructor Detail |
---|
public DFOPostings.DFOIterator(PostingsIteratorFeatures features)
Method Detail |
---|
public PostingsIteratorFeatures getFeatures()
PostingsIterator
getFeatures
in interface PostingsIterator
null
if no features were used.public int getN()
getN
in interface PostingsIterator
public boolean next()
java.util.Iterator.next()
method in that
it does not return an object. This would require too much
object creation overhead during retrieval, and saves the whole
hasNext()
/next()
function call
overhead. You should use the accessor functions for the
iterator to find out the actual ID that the iterator is at.
next
in interface PostingsIterator
protected boolean next(int pos, int id, int off)
id
- The ID to use for that document, if we've skipped to
this point. If id is less than 0, we will use the ID as it was
decoded.off
- The positions offset to use for the next document, if
we've skipped to this point. If this is less than 0, we'll use
the offset as decoded.
true
if there is a next ID,
false
otherwise.protected boolean satisfies()
public boolean findID(int id)
findID
in interface PostingsIterator
id
- The ID that we want to find.
true
if the ID occurs in this entry,
false
otherwise.PostingsIterator.reset()
public void decodeFields()
public void reset()
next
method is called.
reset
in interface PostingsIterator
public int getID()
getID
in interface PostingsIterator
public float getWeight()
getWeight
in interface PostingsIterator
public int getFreq()
getFreq
in interface PostingsIterator
public int[][] getPositions()
getPositions
in interface PosPostingsIterator
public int compareTo(java.lang.Object o)
compareTo
in interface PostingsIterator
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
true
if the iterators are pointing at the
same ID, false
otherwise.public int get(int[] ids)
PostingsIterator
get
in interface PostingsIterator
public int get(int[] ids, int[] freq)
PostingsIterator
get
in interface PostingsIterator
ids
- an array into which IDs will be placed. If possible,
the array will be filled.freq
- an array into which frequencies will be placed. If
possible, the array will be filled.
public int get(int[] ids, float[] weights)
PostingsIterator
get
in interface PostingsIterator
ids
- an array into which IDs will be placed. If possible,
the array will be filled.weights
- an array into which weights will be placed. If
possible, the array will be filled.
public int[] getFieldFreq()
FieldedPostingsIterator
getFieldFreq
in interface FieldedPostingsIterator
public float[] getFieldWeights()
FieldedPostingsIterator
getFieldWeights
in interface FieldedPostingsIterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |