Class OffsetsFromValues
java.lang.Object
org.apache.lucene.search.matchhighlight.OffsetsFromValues
- All Implemented Interfaces:
OffsetsRetrievalStrategy
This strategy works for fields where we know the match occurred but there are no known positions
or offsets.
We re-analyze field values and return offset ranges for entire values (not individual tokens). Re-analysis is required because analyzer may return an unknown offset gap.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget
(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) Return value offsets (match ranges) acquired from the givenMatchesIterator
.
-
Constructor Details
-
OffsetsFromValues
-
-
Method Details
-
get
public List<OffsetRange> get(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) throws IOException Description copied from interface:OffsetsRetrievalStrategy
Return value offsets (match ranges) acquired from the givenMatchesIterator
.- Specified by:
get
in interfaceOffsetsRetrievalStrategy
- Throws:
IOException
-