Class QueryTermScorer
IScorer implementation which scores text fragments by the number of
unique query terms found. This class uses the QueryTermExtractor
class to process determine the query terms and their boosts to be used.
Inheritance
System.Object
QueryTermScorer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Lucene.Net.Highlighter.dll
Syntax
public class QueryTermScorer : IScorer
Constructors
|
Improve this Doc
View Source
QueryTermScorer(WeightedTerm[])
Declaration
public QueryTermScorer(WeightedTerm[] weightedTerms)
Parameters
|
Improve this Doc
View Source
QueryTermScorer(Query)
Declaration
public QueryTermScorer(Query query)
Parameters
Type |
Name |
Description |
Lucene.Net.Search.Query |
query |
a Lucene query (ideally rewritten using Rewrite(IndexReader) before
being passed to this class and the searcher)
|
|
Improve this Doc
View Source
QueryTermScorer(Query, IndexReader, String)
Declaration
public QueryTermScorer(Query query, IndexReader reader, string fieldName)
Parameters
Type |
Name |
Description |
Lucene.Net.Search.Query |
query |
a Lucene query (ideally rewritten using Rewrite(IndexReader) before
being passed to this class and the searcher)
|
Lucene.Net.Index.IndexReader |
reader |
used to compute IDF which can be used to a) score selected
fragments better b) use graded highlights eg set font color
intensity
|
System.String |
fieldName |
the field on which Inverse Document Frequency (IDF)
calculations are based
|
|
Improve this Doc
View Source
QueryTermScorer(Query, String)
Declaration
public QueryTermScorer(Query query, string fieldName)
Parameters
Type |
Name |
Description |
Lucene.Net.Search.Query |
query |
a Lucene query (ideally rewritten using Rewrite(IndexReader) before
being passed to this class and the searcher)
|
System.String |
fieldName |
the Field name which is used to match Query terms
|
Properties
|
Improve this Doc
View Source
FragmentScore
Declaration
public virtual float FragmentScore { get; }
Property Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
MaxTermWeight
The highest weighted term (useful for passing to GradientFormatter
to set top end of coloring scale.
Declaration
public virtual float MaxTermWeight { get; }
Property Value
Type |
Description |
System.Single |
|
Methods
|
Improve this Doc
View Source
AllFragmentsProcessed()
Declaration
public virtual void AllFragmentsProcessed()
|
Improve this Doc
View Source
GetTokenScore()
Declaration
public virtual float GetTokenScore()
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Init(TokenStream)
Declaration
public virtual TokenStream Init(TokenStream tokenStream)
Parameters
Type |
Name |
Description |
Lucene.Net.Analysis.TokenStream |
tokenStream |
|
Returns
Type |
Description |
Lucene.Net.Analysis.TokenStream |
|
|
Improve this Doc
View Source
StartFragment(TextFragment)
Declaration
public virtual void StartFragment(TextFragment newFragment)
Parameters
Implements