public abstract class FieldOffsetStrategy extends Object
OffsetsEnum
yielding potentially highlightable words in the text. Needs
information about the query up front.Modifier and Type | Field and Description |
---|---|
protected UHComponents |
components |
Constructor and Description |
---|
FieldOffsetStrategy(UHComponents components) |
Modifier and Type | Method and Description |
---|---|
protected OffsetsEnum |
createOffsetsEnumFromReader(LeafReader leafReader,
int doc) |
protected void |
createOffsetsEnumsForAutomata(Terms termsIndex,
int doc,
List<OffsetsEnum> results) |
protected void |
createOffsetsEnumsForTerms(BytesRef[] sourceTerms,
Terms termsIndex,
int doc,
List<OffsetsEnum> results) |
protected void |
createOffsetsEnumsWeightMatcher(LeafReader _leafReader,
int docId,
List<OffsetsEnum> results) |
String |
getField() |
abstract OffsetsEnum |
getOffsetsEnum(LeafReader reader,
int docId,
String content)
The primary method -- return offsets for highlightable words in the specified document.
|
abstract UnifiedHighlighter.OffsetSource |
getOffsetSource() |
protected final UHComponents components
public FieldOffsetStrategy(UHComponents components)
public String getField()
public abstract UnifiedHighlighter.OffsetSource getOffsetSource()
public abstract OffsetsEnum getOffsetsEnum(LeafReader reader, int docId, String content) throws IOException
IOException
protected OffsetsEnum createOffsetsEnumFromReader(LeafReader leafReader, int doc) throws IOException
IOException
protected void createOffsetsEnumsWeightMatcher(LeafReader _leafReader, int docId, List<OffsetsEnum> results) throws IOException
IOException
protected void createOffsetsEnumsForTerms(BytesRef[] sourceTerms, Terms termsIndex, int doc, List<OffsetsEnum> results) throws IOException
IOException
protected void createOffsetsEnumsForAutomata(Terms termsIndex, int doc, List<OffsetsEnum> results) throws IOException
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.