| java.lang.Object org.apache.lucene.index.TermVectorMapper
All known Subclasses: org.apache.lucene.index.SortedTermVectorMapper, org.apache.lucene.index.PositionBasedTermVectorMapper, org.apache.lucene.index.FieldSortedTermVectorMapper,
Method Summary | |
public boolean | isIgnoringOffsets() See Also: TermVectorMapper.isIgnoringPositions() See Also: Same principal as TermVectorMapper.isIgnoringPositions() See Also: , but applied to offsets. | public boolean | isIgnoringPositions() Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they
can be skipped over. | abstract public void | map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) | public void | setDocumentNumber(int documentNumber) Passes down the index of the document whose term vector is currently being mapped,
once for each top level call to a term vector reader.
Default implementation IGNORES the document number. | abstract public 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. |
TermVectorMapper | protected TermVectorMapper()(Code) | | |
TermVectorMapper | protected TermVectorMapper(boolean ignoringPositions, boolean ignoringOffsets)(Code) | | Parameters: ignoringPositions - true if this mapper should tell Lucene to ignore positions even if they are stored Parameters: ignoringOffsets - similar to ignoringPositions |
isIgnoringPositions | public boolean isIgnoringPositions()(Code) | | Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they
can be skipped over. Derived classes should set this to true if they want to ignore positions. The default
is false, meaning positions will be loaded if they are stored.
false |
map | abstract public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)(Code) | | Map the Term Vector information into your own structure
Parameters: term - The term to add to the vector Parameters: frequency - The frequency of the term in the document Parameters: offsets - null if the offset is not specified, otherwise the offset into the field of the term Parameters: positions - null if the position is not specified, otherwise the position in the field of the term |
setDocumentNumber | public void setDocumentNumber(int documentNumber)(Code) | | Passes down the index of the document whose term vector is currently being mapped,
once for each top level call to a term vector reader.
Default implementation IGNORES the document number. Override if your implementation needs the document number.
NOTE: Document numbers are internal to Lucene and subject to change depending on indexing operations.
Parameters: documentNumber - index of document currently being mapped |
setExpectations | abstract public void setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions)(Code) | | Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
This method will be called once before retrieving the vector for a field.
This method will be called before
TermVectorMapper.map(String,int,TermVectorOffsetInfo[],int[]) .
Parameters: field - The field the vector is for Parameters: numTerms - The number of terms that need to be mapped Parameters: storeOffsets - true if the mapper should expect offset information Parameters: storePositions - true if the mapper should expect positions info |
|
|