Package org.apache.lucene.search.uhighlight
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term
vectors, or analysis.
- See Also:
UnifiedHighlighter
-
Interface Summary Interface Description CharArrayMatcher Matches a character arrayLabelledCharArrayMatcher Associates a label with a CharArrayMatcher to distinguish different sources for terms in highlighting -
Class Summary Class Description AnalysisOffsetStrategy Provides a base class for analysis based offset strategies to extend from.AnalysisOffsetStrategy.MultiValueTokenStream Wraps anAnalyzer
and string text that represents multiple values delimited by a specified character.CustomSeparatorBreakIterator ABreakIterator
that breaks the text whenever a certain separator, provided as a constructor argument, is found.DefaultPassageFormatter Creates a formatted snippet from the top passages.FieldHighlighter Internal highlighter abstraction that operates on a per field basis.FieldOffsetStrategy Ultimately returns anOffsetsEnum
yielding potentially highlightable words in the text.LengthGoalBreakIterator Wraps anotherBreakIterator
to skip past breaks that would result in passages that are too short.MemoryIndexOffsetStrategy Uses anAnalyzer
on content to get offsets and then populates aMemoryIndex
.MultiTermHighlighting Support for highlighting multi-term queries.MultiTermHighlighting.AutomataCollector NoOpOffsetStrategy Never returns offsets.OffsetsEnum An enumeration/iterator of a term and its offsets for use byFieldHighlighter
.OffsetsEnum.MultiOffsetsEnum A view over several OffsetsEnum instances, merging them in-placeOffsetsEnum.OfMatchesIterator Based on aMatchesIterator
; does not look at submatches.OffsetsEnum.OfMatchesIteratorWithSubs Based on aMatchesIterator
with submatches.OffsetsEnum.OfMatchesIteratorWithSubs.CachedOE OffsetsEnum.OfPostings Based on aPostingsEnum
-- the typical/standard OE impl.OverlaySingleDocTermsLeafReader Overlays a 2nd LeafReader for the terms of one field, otherwise the primary reader is consulted.Passage Represents a passage (typically a sentence of the document).PassageFormatter Creates a formatted snippet from the top passages.PassageScorer Ranks passages found byUnifiedHighlighter
.PhraseHelper Helps theFieldOffsetStrategy
with position sensitive queries (e.g.PhraseHelper.SingleFieldWithOffsetsFilterLeafReader Needed to support the ability to highlight a query irrespective of the field a query refers to (aka requireFieldMatch=false).PhraseHelper.SpanCollectedOffsetsEnum PostingsOffsetStrategy Uses offsets in postings --IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS
.PostingsWithTermVectorsOffsetStrategy LikePostingsOffsetStrategy
but also uses term vectors (only terms needed) for multi-term queries.SplittingBreakIterator Virtually slices the text on both sides of every occurrence of the specified character.TermVectorFilteredLeafReader A filtered LeafReader that only includes the terms that are also in a provided set of terms.TermVectorFilteredLeafReader.TermsFilteredTerms TermVectorFilteredLeafReader.TermVectorFilteredTermsEnum TermVectorOffsetStrategy Uses term vectors that contain offsets.TokenStreamOffsetStrategy Analyzes the text, producing a singleOffsetsEnum
wrapping theTokenStream
filtered to terms in the query, including wildcards.TokenStreamOffsetStrategy.TokenStreamOffsetsEnum UHComponents A parameter object to hold the components aFieldOffsetStrategy
needs.UnifiedHighlighter A Highlighter that can get offsets from either postings (IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS
), term vectors (FieldType.setStoreTermVectorOffsets(boolean)
), or via re-analyzing text.UnifiedHighlighter.Builder Builder for UnifiedHighlighter.UnifiedHighlighter.LimitedStoredFieldVisitor Fetches stored fields for highlighting.UnifiedHighlighter.TermVectorReusingLeafReader Wraps an IndexReader that remembers/caches the last call toTermVectors.get(int)
so that if the next call has the same ID, then it is reused.WholeBreakIterator Just produces one single fragment for the entire text -
Enum Summary Enum Description UnifiedHighlighter.HighlightFlag Flags for controlling highlighting behavior.UnifiedHighlighter.OffsetSource Source of term offsets; essential for highlighting.