Interface MatchRegionRetriever.MatchOffsetsConsumer
- Enclosing class:
MatchRegionRetriever
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A callback invoked for each document selected by the query. The callback receives a list of hit
ranges, document field value accessor, the leaf reader and document ID of the document.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(int docId, LeafReader leafReader, int leafDocId, MatchRegionRetriever.FieldValueProvider fieldValueProvider, Map<String, List<OffsetRange>> hits)
-
Method Details
-
accept
void accept(int docId, LeafReader leafReader, int leafDocId, MatchRegionRetriever.FieldValueProvider fieldValueProvider, Map<String, List<OffsetRange>> hits) throws IOException- Parameters:
docId
- Document id (global).leafReader
- Document'sLeafReader
.leafDocId
- Document id (within theLeafReader
).fieldValueProvider
- Access to preloaded document fields. See theMatchRegionRetriever(IndexSearcher, Query, OffsetsRetrievalStrategySupplier, Predicate, Predicate)
constructor's documentation for guidelines on which fields are available through this interface.hits
- A map of field names and offset ranges with query hits.- Throws:
IOException
-