Class TokenStreamOffsetStrategy
java.lang.Object
org.apache.lucene.search.uhighlight.FieldOffsetStrategy
org.apache.lucene.search.uhighlight.AnalysisOffsetStrategy
org.apache.lucene.search.uhighlight.TokenStreamOffsetStrategy
Analyzes the text, producing a single
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.-
Field Summary
Fields inherited from class org.apache.lucene.search.uhighlight.AnalysisOffsetStrategy
analyzerFields inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
components -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOffsetsEnum(LeafReader reader, int docId, String content) The primary method -- return offsets for highlightable words in the specified document.Methods inherited from class org.apache.lucene.search.uhighlight.AnalysisOffsetStrategy
getOffsetSource, tokenStreamMethods inherited from class org.apache.lucene.search.uhighlight.FieldOffsetStrategy
createOffsetsEnumFromReader, createOffsetsEnumsForAutomata, createOffsetsEnumsForTerms, createOffsetsEnumsWeightMatcher, getField
-
Constructor Details
-
TokenStreamOffsetStrategy
-
-
Method Details
-
getOffsetsEnum
Description copied from class:FieldOffsetStrategyThe primary method -- return offsets for highlightable words in the specified document.Callers are expected to close the returned OffsetsEnum when it has been finished with
- Specified by:
getOffsetsEnumin classFieldOffsetStrategy- Throws:
IOException
-