# Package org.apache.lucene.search.uhighlight

The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  CharArrayMatcher | Matches a character array
  LabelledCharArrayMatcher | 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.
  CustomSeparatorBreakIterator | A `BreakIterator` 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 an `OffsetsEnum` yielding potentially highlightable words in the text.
  LengthGoalBreakIterator | Wraps another `BreakIterator` to skip past breaks that would result in passages that are too short.
  MemoryIndexOffsetStrategy | Uses an `Analyzer` on content to get offsets and then populates a `MemoryIndex`.
  NoOpOffsetStrategy | Never returns offsets.
  OffsetsEnum | An enumeration/iterator of a term and its offsets for use by `FieldHighlighter`.
  OffsetsEnum.MultiOffsetsEnum | A view over several OffsetsEnum instances, merging them in-place
  OffsetsEnum.OfMatchesIterator | Based on a `MatchesIterator`; does not look at submatches.
  OffsetsEnum.OfMatchesIteratorWithSubs | Based on a `MatchesIterator` with submatches.
  OffsetsEnum.OfPostings | Based on a `PostingsEnum` -- 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 by `UnifiedHighlighter`.
  PhraseHelper | Helps the `FieldOffsetStrategy` with position sensitive queries (e.g.
  PostingsOffsetStrategy | Uses offsets in postings -- `IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS`.
  PostingsWithTermVectorsOffsetStrategy | Like `PostingsOffsetStrategy` 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.
  TermVectorOffsetStrategy | Uses term vectors that contain offsets.
  TokenStreamOffsetStrategy | Analyzes the text, producing a single `OffsetsEnum` wrapping the `TokenStream` filtered to terms in the query, including wildcards.
  UHComponents | A parameter object to hold the components a `FieldOffsetStrategy` 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.LimitedStoredFieldVisitor | Fetches stored fields for highlighting.
  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.

## Package org.apache.lucene.search.uhighlight Description

The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis.

See Also:
  `UnifiedHighlighter`

Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.