Uses of Class
org.apache.lucene.search.matchhighlight.OffsetRange
Packages that use OffsetRange
Package
Description
This package contains several components useful to build a highlighter on top of the
Matches
API.-
Uses of OffsetRange in org.apache.lucene.search.matchhighlight
Subclasses of OffsetRange in org.apache.lucene.search.matchhighlightModifier and TypeClassDescriptionstatic class
AnOffsetRange
of a match, together with the source query that caused it.class
A passage is a fragment of source text, scored and possibly with a list of sub-offsets (markers) to be highlighted.Fields in org.apache.lucene.search.matchhighlight with type parameters of type OffsetRangeMethods in org.apache.lucene.search.matchhighlight that return OffsetRangeModifier and TypeMethodDescriptionOffsetRange.clone()
OffsetRange.slice
(int from, int to) Returns a sub-range of this range (a copy).Passage.slice
(int from, int to) Passages can't be sliced as it could split previously determined highlight markers.Methods in org.apache.lucene.search.matchhighlight that return types with arguments of type OffsetRangeModifier and TypeMethodDescriptionOffsetsFromMatchIterator.get
(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) OffsetsFromPositions.get
(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) OffsetsFromTokens.get
(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) OffsetsFromValues.get
(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) OffsetsRetrievalStrategy.get
(MatchesIterator matchesIterator, MatchRegionRetriever.FieldValueProvider doc) Return value offsets (match ranges) acquired from the givenMatchesIterator
.Methods in org.apache.lucene.search.matchhighlight with parameters of type OffsetRangeMethod parameters in org.apache.lucene.search.matchhighlight with type arguments of type OffsetRangeModifier and TypeMethodDescriptionvoid
MatchRegionRetriever.MatchOffsetsConsumer.accept
(int docId, LeafReader leafReader, int leafDocId, Map<String, List<OffsetRange>> hits) MatchHighlighter.FieldValueHighlighter.format
(String field, String[] values, String contiguousValue, List<OffsetRange> valueRanges, List<MatchHighlighter.QueryOffsetRange> matchOffsets) Do format field values appropriately.void
MatchRegionRetriever.highlightDocument
(LeafReaderContext leafReaderContext, int contextDocId, MatchRegionRetriever.FieldValueProvider doc, Predicate<String> acceptField, Map<String, List<OffsetRange>> outputHighlights) Low-level method for retrieving hit ranges for a single document.PassageSelector.pickBest
(CharSequence value, List<? extends OffsetRange> markers, int maxPassageWindow, int maxPassages) PassageSelector.pickBest
(CharSequence value, List<? extends OffsetRange> markers, int maxPassageWindow, int maxPassages, List<OffsetRange> permittedPassageRanges) protected Passage[]
PassageSelector.pickDefaultPassage
(CharSequence value, int maxCharacterWindow, int maxPassages, List<OffsetRange> permittedPassageRanges) Invoked when no passages could be selected (due to constraints or lack of highlight markers).Constructor parameters in org.apache.lucene.search.matchhighlight with type arguments of type OffsetRangeModifierConstructorDescriptionPassage
(int from, int to, List<OffsetRange> markers) PassageFormatter
(String ellipsis, Function<OffsetRange, String> markerStart, Function<OffsetRange, String> markerEnd)