|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.postings.FieldedDocumentVectorPostings
public class FieldedDocumentVectorPostings
A set of fielded document vector postings. We will store a set of document vector postings for each field that is being vectorized.
| Field Summary | |
|---|---|
static java.lang.String |
logTag
|
| Constructor Summary | |
|---|---|
FieldedDocumentVectorPostings()
Creates a new instance of FieldedDocumentVectorPostings |
|
FieldedDocumentVectorPostings(ReadableBuffer b)
Creates a set of fielded document vector postings from a buffer. |
|
| Method Summary | |
|---|---|
void |
add(Occurrence o)
Adds an occurrence to the postings list. |
void |
append(Postings p,
int start)
Appends another set of postings to this one. |
void |
append(Postings p,
int start,
int[] idMap)
Appends another set of postings to this one, removing any data associated with deleted documents. |
void |
finish()
Finishes any ongoing encoding and prepares for the data to be dumped. |
WriteableBuffer[] |
getBuffers()
Gets the buffers for these postings, which includes all of the buffers for the fields as well as the buffer for the complete document and a set of offsets into the buffers. |
int |
getLastID()
Gets the last ID in the postings list. |
int |
getMaxFDT()
Gets the maximum frequency in the postings associated with this entry. |
int |
getN()
Gets the number of IDs in the postings list. |
long |
getTotalOccurrences()
Gets the total number of occurrences associated with this set of postings. |
WeightedFeature[] |
getWeightedFeatures(int field,
int docID,
Dictionary dict,
WeightingFunction wf,
WeightingComponents wc)
Gets the entries for a particular field in this set of postings as an array of weighted features. |
PostingsIterator |
iterator(PostingsIteratorFeatures features)
Gets an iterator for a set of fielded postings. |
void |
merge(MergeablePostings mp,
int[] map)
Merges another set of postings with this set of postings. |
void |
remap(int[] idMap)
Remaps the IDs in this postings list according to the given old-to-new ID map. |
void |
setSkipSize(int size)
Sets the skip size used for building the skip table. |
int |
size()
Gets the size of the postings, in bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String logTag
| Constructor Detail |
|---|
public FieldedDocumentVectorPostings()
public FieldedDocumentVectorPostings(ReadableBuffer b)
| Method Detail |
|---|
public void setSkipSize(int size)
Postings
setSkipSize in interface Postingspublic void add(Occurrence o)
Postings
add in interface Postingso - The occurrence.public int getN()
Postings
getN in interface Postingspublic int getLastID()
Postings
getLastID in interface Postingspublic long getTotalOccurrences()
Postings
getTotalOccurrences in interface Postingspublic int getMaxFDT()
Postings
getMaxFDT in interface Postingspublic void finish()
Postings
finish in interface Postingspublic int size()
Postings
size in interface Postingspublic WriteableBuffer[] getBuffers()
getBuffers in interface PostingsBuffers containing the postings
data. All of the data in these buffers must be written to the
postings file!public void remap(int[] idMap)
Postings
remap in interface PostingsidMap - A map from the IDs currently in use in the postings to
new IDs.
public void merge(MergeablePostings mp,
int[] map)
MergeablePostings
merge in interface MergeablePostingsmp - the postings to merge into these postings.map - a map from IDs in the postings to IDs in the merged space.
public void append(Postings p,
int start)
Postings
append in interface Postingsp - The postings to append. Implementers can safely assume
that the postings being passed in are of the same class as the
implementing class.start - The new starting document ID for the partition
that the entry was drawn from.
public void append(Postings p,
int start,
int[] idMap)
Postings
append in interface Postingsp - The postings to append. Implementers can safely assume
that the postings being passed in are of the same class as the
implementing class.start - The new starting document 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 WeightedFeature[] getWeightedFeatures(int field,
int docID,
Dictionary dict,
WeightingFunction wf,
WeightingComponents wc)
field - the ID of the field for which we want the entries. If this is -1, then we
want the vector for the full document.docID - the id of this document, if it is in an already dumped partition.dict - a dictionary that we can use to fetch term names when all we
have is IDs.wf - a weighting function to use to weight the entries in the document vector.wc - a set of weighting components to use in the weighting fucntion.public PostingsIterator iterator(PostingsIteratorFeatures features)
iterator in interface Postingsfeatures - the features for the iterator that we will return. The field for which
we want postings will be specified in the fields element of the features. If multiple fields
are specified, we will return postings for the first field (by field ID) that we have postings for. If
the features are null or there are no fields specified, then postings for all fields will be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||