public class WeightedSpanTermExtractor extends Object
WeightedSpanTerms from a Query based on whether Terms from the query are contained in a supplied TokenStream.| Constructor and Description |
|---|
WeightedSpanTermExtractor() |
WeightedSpanTermExtractor(String defaultField) |
| Modifier and Type | Method and Description |
|---|---|
Map |
getWeightedSpanTerms(Query query,
CachingTokenFilter cachingTokenFilter)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream. |
Map |
getWeightedSpanTerms(Query query,
CachingTokenFilter cachingTokenFilter,
String fieldName)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream. |
Map |
getWeightedSpanTermsWithScores(Query query,
TokenStream tokenStream,
String fieldName,
IndexReader reader)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream. |
boolean |
isHighlightCnstScrRngQuery() |
void |
setHighlightCnstScrRngQuery(boolean highlightCnstScrRngQuery) |
public WeightedSpanTermExtractor()
public WeightedSpanTermExtractor(String defaultField)
public Map getWeightedSpanTerms(Query query, CachingTokenFilter cachingTokenFilter) throws IOException
WeightedSpanTerms from the given Query and TokenStream.
query - that caused hittokenStream - of text to be highlightedIOExceptionpublic Map getWeightedSpanTerms(Query query, CachingTokenFilter cachingTokenFilter, String fieldName) throws IOException
WeightedSpanTerms from the given Query and TokenStream.
query - that caused hittokenStream - of text to be highlightedfieldName - restricts Term's used based on field nameIOExceptionpublic Map getWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, String fieldName, IndexReader reader) throws IOException
WeightedSpanTerms from the given Query and TokenStream. Uses a supplied
IndexReader to properly weight terms (for gradient highlighting).
query - that caused hittokenStream - of text to be highlightedfieldName - restricts Term's used based on field namereader - to use for scoringIOExceptionpublic boolean isHighlightCnstScrRngQuery()
public void setHighlightCnstScrRngQuery(boolean highlightCnstScrRngQuery)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.