public class PositionBasedTermVectorMapper extends TermVectorMapper
Modifier and Type | Class and Description |
---|---|
static class |
PositionBasedTermVectorMapper.TVPositionInfo
Container for a term at a position
|
Constructor and Description |
---|
PositionBasedTermVectorMapper() |
PositionBasedTermVectorMapper(boolean ignoringOffsets) |
Modifier and Type | Method and Description |
---|---|
Map<String,Map<Integer,PositionBasedTermVectorMapper.TVPositionInfo>> |
getFieldToTerms()
Get the mapping between fields and terms, sorted by the comparator
|
boolean |
isIgnoringPositions()
Never ignores positions.
|
void |
map(String term,
int frequency,
TermVectorOffsetInfo[] offsets,
int[] positions)
Callback for the TermVectorReader.
|
void |
setExpectations(String field,
int numTerms,
boolean storeOffsets,
boolean storePositions)
Callback mechanism used by the TermVectorReader
|
isIgnoringOffsets, setDocumentNumber
public PositionBasedTermVectorMapper()
public PositionBasedTermVectorMapper(boolean ignoringOffsets)
public boolean isIgnoringPositions()
isIgnoringPositions
in class TermVectorMapper
public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
map
in class TermVectorMapper
term
- frequency
- offsets
- positions
- public void setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions)
setExpectations
in class TermVectorMapper
field
- The field being readnumTerms
- The number of terms in the vectorstoreOffsets
- Whether offsets are availablestorePositions
- Whether positions are availablepublic Map<String,Map<Integer,PositionBasedTermVectorMapper.TVPositionInfo>> getFieldToTerms()
PositionBasedTermVectorMapper.TVPositionInfo
.