Package org.apache.lucene.search.uhighlight
package org.apache.lucene.search.uhighlight
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term
vectors, or analysis.
- See Also:
-
ClassDescriptionProvides a base class for analysis based offset strategies to extend from.Matches a character arrayA
BreakIteratorthat breaks the text whenever a certain separator, provided as a constructor argument, is found.Creates a formatted snippet from the top passages.Internal highlighter abstraction that operates on a per field basis.Ultimately returns anOffsetsEnumyielding potentially highlightable words in the text.Associates a label with a CharArrayMatcher to distinguish different sources for terms in highlightingWraps anotherBreakIteratorto skip past breaks that would result in passages that are too short.Uses anAnalyzeron content to get offsets and then populates aMemoryIndex.FieldOffsetStrategy that combines offsets from multiple fields.Never returns offsets.An enumeration/iterator of a term and its offsets for use byFieldHighlighter.A view over several OffsetsEnum instances, merging them in-placeBased on aMatchesIterator; does not look at submatches.Based on aMatchesIteratorwith submatches.Based on aPostingsEnum-- the typical/standard OE impl.Overlays a 2nd LeafReader for the terms of one field, otherwise the primary reader is consulted.Represents a passage (typically a sentence of the document).Creates a formatted snippet from the top passages.Ranks passages found byUnifiedHighlighter.Helps theFieldOffsetStrategywith position sensitive queries (e.g.Uses offsets in postings --IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS.LikePostingsOffsetStrategybut also uses term vectors (only terms needed) for multi-term queries.Virtually slices the text on both sides of every occurrence of the specified character.Uses term vectors that contain offsets.Analyzes the text, producing a singleOffsetsEnumwrapping theTokenStreamfiltered to terms in the query, including wildcards.A parameter object to hold the components aFieldOffsetStrategyneeds.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.Builder for UnifiedHighlighter.Flags for controlling highlighting behavior.Fetches stored fields for highlighting.Source of term offsets; essential for highlighting.Just produces one single fragment for the entire text