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.Wraps an
Analyzerand string text that represents multiple values delimited by a specified character.Matches a character arrayABreakIteratorthat 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.Support for highlighting multi-term queries.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.Needed to support the ability to highlight a query irrespective of the field a query refers to (aka requireFieldMatch=false).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.A filtered LeafReader that only includes the terms that are also in a provided set of terms.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.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.Just produces one single fragment for the entire text