public class SortedTermVectorMapper extends TermVectorMapper
TermVectorEntry
s. 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 comparator) |
SortedTermVectorMapper(java.util.Comparator comparator) |
Modifier and Type | Method and Description |
---|---|
java.util.SortedSet |
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, setDocumentNumber
public static final java.lang.String ALL
TermVectorEntry
.public SortedTermVectorMapper(java.util.Comparator comparator)
comparator
- A Comparator for sorting TermVectorEntry
spublic SortedTermVectorMapper(boolean ignoringPositions, boolean ignoringOffsets, java.util.Comparator comparator)
public void map(java.lang.String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
TermVectorMapper
map
in class TermVectorMapper
term
- 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)
TermVectorMapper
TermVectorMapper.map(String,int,TermVectorOffsetInfo[],int[])
.setExpectations
in class TermVectorMapper
field
- 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 getTermVectorEntrySet()
TermVectorEntry
objects. Sort is by the comparator passed into the constructor.
TermVectorEntry
.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.