Class OffsetsFromMatchIterator
- java.lang.Object
-
- org.apache.lucene.search.matchhighlight.OffsetsFromMatchIterator
-
- All Implemented Interfaces:
OffsetsRetrievalStrategy
public final class OffsetsFromMatchIterator extends Object implements OffsetsRetrievalStrategy
This strategy retrieves offsets directly fromMatchesIterator, if they are available, otherwise it falls back to usingOffsetsFromPositions.
-
-
Constructor Summary
Constructors Constructor Description OffsetsFromMatchIterator(String field, OffsetsFromPositions noOffsetsFallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<OffsetRange>get(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc)Return value offsets (match ranges) acquired from the givenMatchesIterator.
-
-
-
Constructor Detail
-
OffsetsFromMatchIterator
public OffsetsFromMatchIterator(String field, OffsetsFromPositions noOffsetsFallback)
-
-
Method Detail
-
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
-
-