Section navigation

Public classSealed DisjunctionMaxQuery

Namespace
Rowles.LeanCorpus.Search.Queries
Assembly
Rowles.LeanCorpus.dll

Returns the maximum score from any sub-query for a matching document, plus an optional tie-breaking bonus from remaining sub-queries.

public sealed class DisjunctionMaxQuery : Query, IEquatable<Query>
Inheritance
DisjunctionMaxQuery
Implements
Inherited Members
Extension Methods

Public constructor DisjunctionMaxQuery(float)

Initialises a new DisjunctionMaxQuery with the given tie-breaker multiplier.

Public property Disjuncts

Gets the list of sub-queries whose scores are combined.

Public property Field

Gets the single field this query targets, or an empty value for fieldless and multi-field queries.

Public property TieBreakerMultiplier

Contribution of non-maximum clauses to the document score: score = max + tieBreakerMultiplier * sum(rest).

Public method Add(Query)

Adds a disjunct sub-query and returns this for chaining.

Public method Equals(object?)

Determines whether the specified object is equal to the current object.

Public method Freeze()

Marks this instance as immutable; subsequent Add(Query) calls will throw.

Public method GetHashCode()

Serves as the default hash function.

Public method Visit(QueryVisitor)

Visits this query and its children.