Class NoOpOffsetStrategy
- java.lang.Object
-
- org.apache.lucene.search.uhighlight.FieldOffsetStrategy
-
- org.apache.lucene.search.uhighlight.NoOpOffsetStrategy
-
public class NoOpOffsetStrategy extends FieldOffsetStrategy
Never returns offsets. Used when the query would highlight nothing.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static NoOpOffsetStrategy
INSTANCE
-
Fields inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
components
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OffsetsEnum
getOffsetsEnum(LeafReader reader, int docId, String content)
The primary method -- return offsets for highlightable words in the specified document.UnifiedHighlighter.OffsetSource
getOffsetSource()
-
Methods inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
createOffsetsEnumFromReader, createOffsetsEnumsForAutomata, createOffsetsEnumsForTerms, createOffsetsEnumsWeightMatcher, getField
-
-
-
-
Field Detail
-
INSTANCE
public static final NoOpOffsetStrategy INSTANCE
-
-
Method Detail
-
getOffsetSource
public UnifiedHighlighter.OffsetSource getOffsetSource()
- Specified by:
getOffsetSource
in classFieldOffsetStrategy
-
getOffsetsEnum
public OffsetsEnum getOffsetsEnum(LeafReader reader, int docId, String content) throws IOException
Description copied from class:FieldOffsetStrategy
The 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:
getOffsetsEnum
in classFieldOffsetStrategy
- Throws:
IOException
-
-