public class MemoryIndexOffsetStrategy extends AnalysisOffsetStrategy
Analyzer
on content to get offsets and then populates a MemoryIndex
.analyzer
automata, field, phraseHelper, terms
Constructor and Description |
---|
MemoryIndexOffsetStrategy(String field,
Predicate<String> fieldMatcher,
BytesRef[] extractedTerms,
PhraseHelper phraseHelper,
CharacterRunAutomaton[] automata,
Analyzer analyzer,
Function<Query,Collection<Query>> multiTermQueryRewrite) |
Modifier and Type | Method and Description |
---|---|
List<OffsetsEnum> |
getOffsetsEnums(IndexReader reader,
int docId,
String content)
The primary method -- return offsets for highlightable words in the specified document.
|
getOffsetSource, tokenStream
createAutomataOffsetsFromTerms, createOffsetsEnumsFromReader, getField
public MemoryIndexOffsetStrategy(String field, Predicate<String> fieldMatcher, BytesRef[] extractedTerms, PhraseHelper phraseHelper, CharacterRunAutomaton[] automata, Analyzer analyzer, Function<Query,Collection<Query>> multiTermQueryRewrite)
public List<OffsetsEnum> getOffsetsEnums(IndexReader reader, int docId, String content) throws IOException
FieldOffsetStrategy
getOffsetsEnums
in class FieldOffsetStrategy
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.