Class MemoryIndexOffsetStrategy
- java.lang.Object
-
- org.apache.lucene.search.uhighlight.FieldOffsetStrategy
-
- org.apache.lucene.search.uhighlight.AnalysisOffsetStrategy
-
- org.apache.lucene.search.uhighlight.MemoryIndexOffsetStrategy
-
public class MemoryIndexOffsetStrategy extends AnalysisOffsetStrategy
Uses anAnalyzer
on content to get offsets and then populates aMemoryIndex
.- 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.AnalysisOffsetStrategy
analyzer
-
Fields inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
components
-
-
Constructor Summary
Constructors Constructor Description MemoryIndexOffsetStrategy(UHComponents components, Analyzer analyzer)
-
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.-
Methods inherited from class org.apache.lucene.search.uhighlight.AnalysisOffsetStrategy
getOffsetSource, tokenStream
-
Methods inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
createOffsetsEnumFromReader, createOffsetsEnumsForAutomata, createOffsetsEnumsForTerms, createOffsetsEnumsWeightMatcher, getField
-
-
-
-
Constructor Detail
-
MemoryIndexOffsetStrategy
public MemoryIndexOffsetStrategy(UHComponents components, Analyzer analyzer)
-
-
Method Detail
-
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
-
-