Class used to extract WeightedSpanTerms from a based on whether
s from the are contained in a supplied .
Inheritance
System.Object
WeightedSpanTermExtractor
Assembly: Lucene.Net.Highlighter.dll
public class WeightedSpanTermExtractor : object
Constructors
|
Improve this Doc
View Source
Declaration
public WeightedSpanTermExtractor()
|
Improve this Doc
View Source
Declaration
public WeightedSpanTermExtractor(string defaultField)
Parameters
Type |
Name |
Description |
System.String |
defaultField |
|
Properties
|
Improve this Doc
View Source
ExpandMultiTermQuery
Declaration
public virtual bool ExpandMultiTermQuery { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public virtual bool IsCachedTokenStream { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public virtual TokenStream TokenStream { get; }
Property Value
Type |
Description |
TokenStream |
|
Methods
|
Improve this Doc
View Source
Declaration
protected virtual void CollectSpanQueryFields(SpanQuery spanQuery, ISet<string> fieldNames)
Parameters
Type |
Name |
Description |
SpanQuery |
spanQuery |
|
ISet<System.String> |
fieldNames |
|
|
Improve this Doc
View Source
Declaration
protected virtual void Extract(Query query, IDictionary<string, WeightedSpanTerm> terms)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void ExtractUnknownQuery(Query query, IDictionary<string, WeightedSpanTerm> terms)
Parameters
Type |
Name |
Description |
Query |
query |
|
IDictionary<System.String, WeightedSpanTerm> |
terms |
|
|
Improve this Doc
View Source
Declaration
protected virtual void ExtractWeightedSpanTerms(IDictionary<string, WeightedSpanTerm> terms, SpanQuery spanQuery)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void ExtractWeightedTerms(IDictionary<string, WeightedSpanTerm> terms, Query query)
Parameters
|
Improve this Doc
View Source
Necessary to implement matches for queries against Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.defaultField
Declaration
protected virtual bool FieldNameComparer(string fieldNameToCheck)
Parameters
Type |
Name |
Description |
System.String |
fieldNameToCheck |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
protected virtual AtomicReaderContext GetLeafContext()
Returns
Type |
Description |
AtomicReaderContext |
|
|
Improve this Doc
View Source
Creates an from the given and .
Declaration
public virtual IDictionary<string, WeightedSpanTerm> GetWeightedSpanTerms(Query query, TokenStream tokenStream)
Parameters
Type |
Name |
Description |
Query |
query |
that caused hit
|
TokenStream |
tokenStream |
of text to be highlighted
|
Returns
|
Improve this Doc
View Source
Creates an from the given and .
Declaration
public virtual IDictionary<string, WeightedSpanTerm> GetWeightedSpanTerms(Query query, TokenStream tokenStream, string fieldName)
Parameters
Type |
Name |
Description |
Query |
query |
that caused hit
|
TokenStream |
tokenStream |
of text to be highlighted
|
System.String |
fieldName |
restricts Term's used based on field name
|
Returns
|
Improve this Doc
View Source
Creates an from the given and . Uses a supplied
to properly Weight terms (for gradient highlighting).
Declaration
public virtual IDictionary<string, WeightedSpanTerm> GetWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, string fieldName, IndexReader reader)
Parameters
Type |
Name |
Description |
Query |
query |
that caused hit
|
TokenStream |
tokenStream |
of text to be highlighted
|
System.String |
fieldName |
restricts Term's used based on field name
|
IndexReader |
reader |
to use for scoring
|
Returns
|
Improve this Doc
View Source
Declaration
protected virtual bool MustRewriteQuery(SpanQuery spanQuery)
Parameters
Type |
Name |
Description |
SpanQuery |
spanQuery |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
protected void SetMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)
Parameters
Type |
Name |
Description |
System.Int32 |
maxDocCharsToAnalyze |
|
|
Improve this Doc
View Source
By default, s that are not of the type
are wrapped in a to
impl and you don't want it to be wrapped, set this to
false.
Declaration
public virtual void SetWrapIfNotCachingTokenFilter(bool wrap)
Parameters
Type |
Name |
Description |
System.Boolean |
wrap |
|