Class Weight
Expert: Calculate query weights and build query scorers.
The purpose of Weight is to ensure searching does not
modify a Query, so that a Query instance can be reused.
Searcher dependent state of the query should reside in the
Weight.
IndexReader dependent state should reside in the Scorer(IndexReader, Boolean, Boolean).
A Weight
is used in the following way:
Inheritance
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public abstract class Weight : object
Properties
Name | Description |
---|---|
Query | The query that this concerns. |
Value | The weight for this query. |
Methods
Name | Description |
---|---|
Explain(IndexReader, Int32) | An explanation of the score computation for the named document. |
GetScoresDocsOutOfOrder() | Returns true iff this implementation scores docs only out of order. This method is used in conjunction with Collector's AcceptsDocsOutOfOrder and Scorer(IndexReader, Boolean, Boolean) to create a matching Scorer(IndexReader, Boolean, Boolean) instance for a given Collector, or vice versa.
NOTE: the default implementation returns |
GetSumOfSquaredWeights() | The sum of squared weights of contained query clauses. |
Normalize(Single) | Assigns the query normalization factor to this. |
Scorer(IndexReader, Boolean, Boolean) | Returns a Scorer(IndexReader, Boolean, Boolean) which scores documents in/out-of order according
to
NOTE: even if |