The BoostingTermQuery is very similar to the {@link Lucene.Net.Search.Spans.SpanTermQuery} except that it factors in the value of the payload located at each of the positions where the {@link Lucene.Net.Index.Term} occurs.

In order to take advantage of this, you must override {@link Lucene.Net.Search.Similarity#ScorePayload(String, byte[],int,int)} which returns 1 by default.

Payload scores are averaged across term occurrences in the document.

The BoostingTermQuery..::..BoostingTermWeight type exposes the following members.

Constructors

  NameDescription
Public methodBoostingTermQuery..::..BoostingTermWeight
Initializes a new instance of the BoostingTermQuery..::..BoostingTermWeight class

Methods

  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExplain (Inherited from SpanWeight.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetQuery (Inherited from SpanWeight.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue (Inherited from SpanWeight.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNormalize (Inherited from SpanWeight.)
Public methodScorer (Overrides PayloadTermQuery..::..PayloadTermWeight..::..Scorer(IndexReader, Boolean, Boolean).)
Public methodScoresDocsOutOfOrder
Returns true iff this implementation scores docs only out of order. This method is used in conjunction with {@link Collector}'s {@link Collector#AcceptsDocsOutOfOrder() acceptsDocsOutOfOrder} and {@link #Scorer(Lucene.Net.Index.IndexReader, boolean, boolean)} to create a matching {@link Scorer} instance for a given {@link Collector}, or vice versa.

NOTE: the default implementation returns

CopyC#
false
, i.e. the
CopyC#
Scorer
scores documents in-order.
(Inherited from Weight.)
Public methodSumOfSquaredWeights (Inherited from SpanWeight.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Fields

  NameDescription
Protected fieldidf (Inherited from SpanWeight.)
Protected fieldquery (Inherited from SpanWeight.)
Protected fieldqueryNorm (Inherited from SpanWeight.)
Protected fieldqueryWeight (Inherited from SpanWeight.)
Protected fieldsimilarity (Inherited from SpanWeight.)
Protected fieldterms (Inherited from SpanWeight.)
Protected fieldvalue_Renamed (Inherited from SpanWeight.)

Properties

  NameDescription
Public propertyEnclosing_Instance

See Also