public abstract class FieldOffsetStrategy
extends java.lang.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,
java.util.List<OffsetsEnum> results) |
protected void |
createOffsetsEnumsForTerms(BytesRef[] sourceTerms,
Terms termsIndex,
int doc,
java.util.List<OffsetsEnum> results) |
protected void |
createOffsetsEnumsWeightMatcher(LeafReader _leafReader,
int docId,
java.util.List<OffsetsEnum> results) |
java.lang.String |
getField() |
abstract OffsetsEnum |
getOffsetsEnum(LeafReader reader,
int docId,
java.lang.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 java.lang.String getField()
public abstract UnifiedHighlighter.OffsetSource getOffsetSource()
public abstract OffsetsEnum getOffsetsEnum(LeafReader reader, int docId, java.lang.String content) throws java.io.IOException
java.io.IOException
protected OffsetsEnum createOffsetsEnumFromReader(LeafReader leafReader, int doc) throws java.io.IOException
java.io.IOException
protected void createOffsetsEnumsWeightMatcher(LeafReader _leafReader, int docId, java.util.List<OffsetsEnum> results) throws java.io.IOException
java.io.IOException
protected void createOffsetsEnumsForTerms(BytesRef[] sourceTerms, Terms termsIndex, int doc, java.util.List<OffsetsEnum> results) throws java.io.IOException
java.io.IOException
protected void createOffsetsEnumsForAutomata(Terms termsIndex, int doc, java.util.List<OffsetsEnum> results) throws java.io.IOException
java.io.IOException
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.