Initializes a new instance of the QueryScorer class

Namespace: Lucene.Net.Highlight
Assembly: Lucene.Net.Contrib.Highlighter (in Lucene.Net.Contrib.Highlighter.dll) Version: 2.3.2.1

Syntax

C#
public QueryScorer(
	Query query,
	IndexReader reader,
	string fieldName
)
Visual Basic
Public Sub New ( _
	query As Query, _
	reader As IndexReader, _
	fieldName As String _
)
Visual C++
public:
QueryScorer(
	Query^ query, 
	IndexReader^ reader, 
	String^ fieldName
)

Parameters

query
Type: Lucene.Net.Search..::..Query
a Lucene query (ideally rewritten using query.rewrite before being passed to this class and the searcher)
reader
Type: Lucene.Net.Index..::..IndexReader
used to compute IDF which can be used to a) score selected fragments better b) use graded highlights eg set font color intensity
fieldName
Type: System..::..String
the field on which Inverse Document Frequency (IDF) calculations are based

See Also