Table of Contents

Class SearchDefinition<TDocument>

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

Base class for search definitions.

public abstract class SearchDefinition<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
SearchDefinition<TDocument>
Derived
Inherited Members

Methods

Render(SearchDefinitionRenderContext<TDocument>)

Renders the search definition to a BsonDocument.

public abstract BsonDocument Render(SearchDefinitionRenderContext<TDocument> renderContext)

Parameters

renderContext SearchDefinitionRenderContext<TDocument>

The render context.

Returns

BsonDocument

A BsonDocument.

Operators

implicit operator SearchDefinition<TDocument>(BsonDocument)

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

public static implicit operator SearchDefinition<TDocument>(BsonDocument document)

Parameters

document BsonDocument

The BSON document specifying the search definition.

Returns

SearchDefinition<TDocument>

The result of the conversion.

implicit operator SearchDefinition<TDocument>(string)

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

public static implicit operator SearchDefinition<TDocument>(string json)

Parameters

json string

The string specifying the search definition in JSON.

Returns

SearchDefinition<TDocument>

The result of the conversion.