Interface OffsetsRetrievalStrategy
- All Known Implementing Classes:
OffsetsFromMatchIterator
,OffsetsFromPositions
,OffsetsFromTokens
,OffsetsFromValues
public interface OffsetsRetrievalStrategy
Determines how match offset regions are computed from
MatchesIterator
. Several
possibilities exist, ranging from retrieving offsets directly from a match instance to
re-evaluating the document's field and recomputing offsets from there.-
Method Summary
Modifier and TypeMethodDescriptionget
(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) Return value offsets (match ranges) acquired from the givenMatchesIterator
.default boolean
Whether this strategy requires document field access.
-
Method Details
-
get
List<OffsetRange> get(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) throws IOException Return value offsets (match ranges) acquired from the givenMatchesIterator
.- Throws:
IOException
-
requiresDocument
default boolean requiresDocument()Whether this strategy requires document field access.
-