public class FieldSortedTermVectorMapper extends TermVectorMapper
TermVectorEntrys
This is not thread-safe.| Constructor and Description |
|---|
FieldSortedTermVectorMapper(boolean ignoringPositions,
boolean ignoringOffsets,
java.util.Comparator<TermVectorEntry> comparator) |
FieldSortedTermVectorMapper(java.util.Comparator<TermVectorEntry> comparator) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Comparator<TermVectorEntry> |
getComparator() |
java.util.Map<java.lang.String,java.util.SortedSet<TermVectorEntry>> |
getFieldToTerms()
Get the mapping between fields and terms, sorted by the comparator
|
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 FieldSortedTermVectorMapper(java.util.Comparator<TermVectorEntry> comparator)
comparator - A Comparator for sorting TermVectorEntryspublic FieldSortedTermVectorMapper(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 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(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.Map<java.lang.String,java.util.SortedSet<TermVectorEntry>> getFieldToTerms()
SortedSets per field. SortedSet entries are TermVectorEntrypublic java.util.Comparator<TermVectorEntry> getComparator()