Table of Contents

Class CompoundSearchDefinitionBuilder<TDocument>

Namespace
MongoDB.Driver.Search
Assembly
MongoDB.Driver.dll

A builder for compound search definitions.

public sealed class CompoundSearchDefinitionBuilder<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
CompoundSearchDefinitionBuilder<TDocument>
Inherited Members

Constructors

CompoundSearchDefinitionBuilder(SearchScoreDefinition<TDocument>)

Initializes a new instance of the CompoundSearchDefinitionBuilder<TDocument> class.

Methods

Filter(params SearchDefinition<TDocument>[])

Adds clauses which must all match for a document to be included in the results.

Filter(IEnumerable<SearchDefinition<TDocument>>)

Adds clauses which must all match for a document to be included in the results.

MinimumShouldMatch(int)

Sets a value specifying the minimum number of should clauses the must match to include a document in the results.

Must(params SearchDefinition<TDocument>[])

Adds clauses which must match to produce results.

Must(IEnumerable<SearchDefinition<TDocument>>)

Adds clauses which must match to produce results.

MustNot(params SearchDefinition<TDocument>[])

Adds clauses which must not match for a document to be included in the results.

MustNot(IEnumerable<SearchDefinition<TDocument>>)

Adds clauses which must not match for a document to be included in the results.

Should(params SearchDefinition<TDocument>[])

Adds clauses which cause documents in the result set to be scored higher if they match.

Should(IEnumerable<SearchDefinition<TDocument>>)

Adds clauses which cause documents in the result set to be scored higher if they match.

ToSearchDefinition()

Constructs a search definition from the builder.

Operators

implicit operator SearchDefinition<TDocument>(CompoundSearchDefinitionBuilder<TDocument>)

Performs an implicit conversion from a CompoundSearchDefinitionBuilder<TDocument> to a SearchDefinition<TDocument>.