Table of Contents

Method Wildcard

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

Wildcard(SearchPathDefinition<TDocument>, SearchQueryDefinition, bool, SearchScoreDefinition<TDocument>)

Creates a search definition that uses special characters in the search string that can match any character.

public SearchDefinition<TDocument> Wildcard(SearchPathDefinition<TDocument> path, SearchQueryDefinition query, bool allowAnalyzedField = false, SearchScoreDefinition<TDocument> score = null)

Parameters

path SearchPathDefinition<TDocument>

The indexed field or fields to search.

query SearchQueryDefinition

The string or strings to search for.

allowAnalyzedField bool

Must be set to true if the query is run against an analyzed field.

score SearchScoreDefinition<TDocument>

The score modifier.

Returns

SearchDefinition<TDocument>

A wildcard search definition.

Wildcard<TField>(Expression<Func<TDocument, TField>>, SearchQueryDefinition, bool, SearchScoreDefinition<TDocument>)

Creates a search definition that uses special characters in the search string that can match any character.

public SearchDefinition<TDocument> Wildcard<TField>(Expression<Func<TDocument, TField>> path, SearchQueryDefinition query, bool allowAnalyzedField = false, SearchScoreDefinition<TDocument> score = null)

Parameters

path Expression<Func<TDocument, TField>>

The indexed field or fields to search.

query SearchQueryDefinition

The string or strings to search for.

allowAnalyzedField bool

Must be set to true if the query is run against an analyzed field.

score SearchScoreDefinition<TDocument>

The score modifier.

Returns

SearchDefinition<TDocument>

A wildcard search definition.

Type Parameters

TField

The type of the field.