public class PostingsOffsetStrategy extends FieldOffsetStrategy
IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS
. This
does not support multi-term queries; the highlighter will fallback on analysis for that.automata, field, phraseHelper, terms
Constructor and Description |
---|
PostingsOffsetStrategy(java.lang.String field,
BytesRef[] queryTerms,
PhraseHelper phraseHelper,
CharacterRunAutomaton[] automata) |
Modifier and Type | Method and Description |
---|---|
java.util.List<OffsetsEnum> |
getOffsetsEnums(IndexReader reader,
int docId,
java.lang.String content)
The primary method -- return offsets for highlightable words in the specified document.
|
UnifiedHighlighter.OffsetSource |
getOffsetSource() |
createAutomataOffsetsFromTerms, createOffsetsEnumsFromReader, getField
public PostingsOffsetStrategy(java.lang.String field, BytesRef[] queryTerms, PhraseHelper phraseHelper, CharacterRunAutomaton[] automata)
public java.util.List<OffsetsEnum> getOffsetsEnums(IndexReader reader, int docId, java.lang.String content) throws java.io.IOException
FieldOffsetStrategy
getOffsetsEnums
in class FieldOffsetStrategy
java.io.IOException
public UnifiedHighlighter.OffsetSource getOffsetSource()
getOffsetSource
in class FieldOffsetStrategy
Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.