Class PostingsOffsetStrategy
- java.lang.Object
-
- org.apache.lucene.search.uhighlight.FieldOffsetStrategy
-
- org.apache.lucene.search.uhighlight.PostingsOffsetStrategy
-
public class PostingsOffsetStrategy extends FieldOffsetStrategy
Uses offsets in postings --IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS. This does not support multi-term queries; the highlighter will fallback on analysis for that.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
components
-
-
Constructor Summary
Constructors Constructor Description PostingsOffsetStrategy(UHComponents components)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OffsetsEnumgetOffsetsEnum(LeafReader reader, int docId, String content)The primary method -- return offsets for highlightable words in the specified document.UnifiedHighlighter.OffsetSourcegetOffsetSource()-
Methods inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
createOffsetsEnumFromReader, createOffsetsEnumsForAutomata, createOffsetsEnumsForTerms, createOffsetsEnumsWeightMatcher, getField
-
-
-
-
Constructor Detail
-
PostingsOffsetStrategy
public PostingsOffsetStrategy(UHComponents components)
-
-
Method Detail
-
getOffsetsEnum
public OffsetsEnum getOffsetsEnum(LeafReader reader, int docId, String content) throws IOException
Description copied from class:FieldOffsetStrategyThe primary method -- return offsets for highlightable words in the specified document.Callers are expected to close the returned OffsetsEnum when it has been finished with
- Specified by:
getOffsetsEnumin classFieldOffsetStrategy- Throws:
IOException
-
getOffsetSource
public UnifiedHighlighter.OffsetSource getOffsetSource()
- Specified by:
getOffsetSourcein classFieldOffsetStrategy
-
-