Table of Contents

Method Wildcard

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Wildcard(FieldDefinition<TDocument>)

Creates a wildcard index key definition. The method doesn't expect to specify a wildcard key explicitly.

public IndexKeysDefinition<TDocument> Wildcard(FieldDefinition<TDocument> field = null)

Parameters

field FieldDefinition<TDocument>

The wildcard key name. If the wildcard name is empty, the generated key will be All field paths, otherwise A single field path.

Returns

IndexKeysDefinition<TDocument>

A wildcard index key definition.

Wildcard(Expression<Func<TDocument, object>>)

Creates a wildcard index key definition.

public IndexKeysDefinition<TDocument> Wildcard(Expression<Func<TDocument, object>> field)

Parameters

field Expression<Func<TDocument, object>>

The field expression representing the wildcard key name.

Returns

IndexKeysDefinition<TDocument>

A wildcard index key definition.