Table of Contents

Method MustNot

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

MustNot(IEnumerable<SearchDefinition<TDocument>>)

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

public CompoundSearchDefinitionBuilder<TDocument> MustNot(IEnumerable<SearchDefinition<TDocument>> clauses)

Parameters

clauses IEnumerable<SearchDefinition<TDocument>>

The clauses.

Returns

CompoundSearchDefinitionBuilder<TDocument>

The compound search definition builder.

MustNot(params SearchDefinition<TDocument>[])

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

public CompoundSearchDefinitionBuilder<TDocument> MustNot(params SearchDefinition<TDocument>[] clauses)

Parameters

clauses SearchDefinition<TDocument>[]

The clauses.

Returns

CompoundSearchDefinitionBuilder<TDocument>

The compound search definition builder.