Class OffsetsFromMatchIterator
java.lang.Object
org.apache.lucene.search.matchhighlight.OffsetsFromMatchIterator
- All Implemented Interfaces:
OffsetsRetrievalStrategy
This strategy retrieves offsets directly from
MatchesIterator, if they are available,
otherwise it falls back to using OffsetsFromPositions.-
Constructor Summary
ConstructorsConstructorDescriptionOffsetsFromMatchIterator(String field, OffsetsFromPositions noOffsetsFallback) -
Method Summary
Modifier and TypeMethodDescriptionget(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) Return value offsets (match ranges) acquired from the givenMatchesIterator.
-
Constructor Details
-
OffsetsFromMatchIterator
-
-
Method Details
-
get
public List<OffsetRange> get(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) throws IOException Description copied from interface:OffsetsRetrievalStrategyReturn value offsets (match ranges) acquired from the givenMatchesIterator.- Specified by:
getin interfaceOffsetsRetrievalStrategy- Throws:
IOException
-