public class InstantiatedTermPositionVector extends InstantiatedTermFreqVector implements TermPositionVector, Serializable
InstantiatedIndexReader.TermPositionVector,
Serialized Form| Constructor and Description |
|---|
InstantiatedTermPositionVector(InstantiatedDocument document,
String field) |
| Modifier and Type | Method and Description |
|---|---|
TermVectorOffsetInfo[] |
getOffsets(int index)
Returns an array of TermVectorOffsetInfo in which the term is found.
|
int[] |
getTermPositions(int index)
Returns an array of positions in which the term is found.
|
getField, getTermDocumentInformations, getTermFrequencies, getTerms, indexesOf, indexOf, size, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetField, getTermFrequencies, getTerms, indexesOf, indexOf, sizepublic InstantiatedTermPositionVector(InstantiatedDocument document, String field)
public int[] getTermPositions(int index)
TermPositionVectorindexOf method.
May return null if positions have not been stored.getTermPositions in interface TermPositionVectorpublic TermVectorOffsetInfo[] getOffsets(int index)
TermPositionVectorgetOffsets in interface TermPositionVectorindex - The position in the array to get the offsets fromToken