public class SortedTermVectorMapper extends TermVectorMapper
TermVectorEntrys. Collects all term information
into a single, SortedSet.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALL
Stand-in name for the field in
TermVectorEntry. |
| Constructor and Description |
|---|
SortedTermVectorMapper(boolean ignoringPositions,
boolean ignoringOffsets,
java.util.Comparator<TermVectorEntry> comparator) |
SortedTermVectorMapper(java.util.Comparator<TermVectorEntry> comparator) |
| Modifier and Type | Method and Description |
|---|---|
java.util.SortedSet<TermVectorEntry> |
getTermVectorEntrySet()
The TermVectorEntrySet.
|
void |
map(java.lang.String term,
int frequency,
TermVectorOffsetInfo[] offsets,
int[] positions)
Map the Term Vector information into your own structure
|
void |
setExpectations(java.lang.String field,
int numTerms,
boolean storeOffsets,
boolean storePositions)
Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
|
isIgnoringOffsets, isIgnoringPositions, setDocumentNumberpublic static final java.lang.String ALL
TermVectorEntry.public SortedTermVectorMapper(java.util.Comparator<TermVectorEntry> comparator)
comparator - A Comparator for sorting TermVectorEntryspublic SortedTermVectorMapper(boolean ignoringPositions,
boolean ignoringOffsets,
java.util.Comparator<TermVectorEntry> comparator)
public void map(java.lang.String term,
int frequency,
TermVectorOffsetInfo[] offsets,
int[] positions)
TermVectorMappermap in class TermVectorMapperterm - The term to mapfrequency - The frequency of the termoffsets - Offset information, may be nullpositions - Position information, may be nullpublic void setExpectations(java.lang.String field,
int numTerms,
boolean storeOffsets,
boolean storePositions)
TermVectorMapperTermVectorMapper.map(String,int,TermVectorOffsetInfo[],int[]).setExpectations in class TermVectorMapperfield - The field the vector is fornumTerms - The number of terms that need to be mappedstoreOffsets - true if the mapper should expect offset informationstorePositions - true if the mapper should expect positions infopublic java.util.SortedSet<TermVectorEntry> getTermVectorEntrySet()
TermVectorEntry objects. Sort is by the comparator passed into the constructor.
TermVectorEntry.