public class TokenStreamOffsetStrategy extends AnalysisOffsetStrategy
OffsetsEnum
wrapping the TokenStream
filtered to terms
in the query, including wildcards. It can't handle position-sensitive queries (phrases). Passage accuracy suffers
because the freq() is unknown -- it's always Integer.MAX_VALUE
instead.analyzer
components
Constructor and Description |
---|
TokenStreamOffsetStrategy(UHComponents components,
Analyzer indexAnalyzer) |
Modifier and Type | Method and Description |
---|---|
OffsetsEnum |
getOffsetsEnum(LeafReader reader,
int docId,
String content)
The primary method -- return offsets for highlightable words in the specified document.
|
getOffsetSource, tokenStream
createOffsetsEnumFromReader, createOffsetsEnumsForAutomata, createOffsetsEnumsForTerms, createOffsetsEnumsWeightMatcher, getField
public TokenStreamOffsetStrategy(UHComponents components, Analyzer indexAnalyzer)
public OffsetsEnum getOffsetsEnum(LeafReader reader, int docId, String content) throws IOException
FieldOffsetStrategy
getOffsetsEnum
in class FieldOffsetStrategy
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.