|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.index.TermVectorMapper org.apache.lucene.index.PositionBasedTermVectorMapper
public class PositionBasedTermVectorMapper
For each Field, store position by position information. It ignores frequency information
This is not thread-safe.
Nested Class Summary | |
---|---|
static class |
PositionBasedTermVectorMapper.TVPositionInfo
Container for a term at a position |
Constructor Summary | |
---|---|
PositionBasedTermVectorMapper()
|
|
PositionBasedTermVectorMapper(boolean ignoringOffsets)
|
Method Summary | |
---|---|
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 |
Methods inherited from class org.apache.lucene.index.TermVectorMapper |
---|
isIgnoringOffsets, setDocumentNumber |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PositionBasedTermVectorMapper()
public PositionBasedTermVectorMapper(boolean ignoringOffsets)
Method Detail |
---|
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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |