public class SortedTermVectorMapper extends TermVectorMapper
TermVectorEntrys. Collects all term information
into a single, SortedSet.
| Modifier and Type | Field and Description |
|---|---|
static String |
ALL
Stand-in name for the field in
TermVectorEntry. |
| Constructor and Description |
|---|
SortedTermVectorMapper(boolean ignoringPositions,
boolean ignoringOffsets,
Comparator<TermVectorEntry> comparator) |
SortedTermVectorMapper(Comparator<TermVectorEntry> comparator) |
| Modifier and Type | Method and Description |
|---|---|
SortedSet<TermVectorEntry> |
getTermVectorEntrySet()
The TermVectorEntrySet.
|
void |
map(String term,
int frequency,
TermVectorOffsetInfo[] offsets,
int[] positions)
Map the Term Vector information into your own structure
|
void |
setExpectations(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 String ALL
TermVectorEntry.public SortedTermVectorMapper(Comparator<TermVectorEntry> comparator)
comparator - A Comparator for sorting TermVectorEntryspublic SortedTermVectorMapper(boolean ignoringPositions,
boolean ignoringOffsets,
Comparator<TermVectorEntry> comparator)
public void map(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(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 SortedSet<TermVectorEntry> getTermVectorEntrySet()
TermVectorEntry objects. Sort is by the comparator passed into the constructor.
TermVectorEntry.