Table of Contents

Method QueryString

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

QueryString(FieldDefinition<TDocument>, string, SearchScoreDefinition<TDocument>)

Creates a search definition that queries a combination of indexed fields and values.

public SearchDefinition<TDocument> QueryString(FieldDefinition<TDocument> defaultPath, string query, SearchScoreDefinition<TDocument> score = null)

Parameters

defaultPath FieldDefinition<TDocument>

The indexed field to search by default.

query string

One or more indexed fields and values to search.

score SearchScoreDefinition<TDocument>

The score modifier.

Returns

SearchDefinition<TDocument>

A query string search definition.

QueryString<TField>(Expression<Func<TDocument, TField>>, string, SearchScoreDefinition<TDocument>)

Creates a search definition that queries a combination of indexed fields and values.

public SearchDefinition<TDocument> QueryString<TField>(Expression<Func<TDocument, TField>> defaultPath, string query, SearchScoreDefinition<TDocument> score = null)

Parameters

defaultPath Expression<Func<TDocument, TField>>

The indexed field to search by default.

query string

One or more indexed fields and values to search.

score SearchScoreDefinition<TDocument>

The score modifier.

Returns

SearchDefinition<TDocument>

A query string search definition.

Type Parameters

TField

The type of the field.