public class FieldSortedTermVectorMapper extends TermVectorMapper
TermVectorEntrys
This is not thread-safe.| Constructor and Description |
|---|
FieldSortedTermVectorMapper(boolean ignoringPositions,
boolean ignoringOffsets,
Comparator<TermVectorEntry> comparator) |
FieldSortedTermVectorMapper(Comparator<TermVectorEntry> comparator) |
| Modifier and Type | Method and Description |
|---|---|
Comparator<TermVectorEntry> |
getComparator() |
Map<String,SortedSet<TermVectorEntry>> |
getFieldToTerms()
Get the mapping between fields and terms, sorted by the comparator
|
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 FieldSortedTermVectorMapper(Comparator<TermVectorEntry> comparator)
comparator - A Comparator for sorting TermVectorEntryspublic FieldSortedTermVectorMapper(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 add to the vectorfrequency - The frequency of the term in the documentoffsets - null if the offset is not specified, otherwise the offset into the field of the termpositions - null if the position is not specified, otherwise the position in the field of the termpublic 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 Map<String,SortedSet<TermVectorEntry>> getFieldToTerms()
SortedSets per field. SortedSet entries are TermVectorEntrypublic Comparator<TermVectorEntry> getComparator()