Table of Contents

Method Text

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

Text(string)

Generate a text search query that tests whether the given search string is present.

public static IMongoQuery Text(string searchString)

Parameters

searchString string

The search string.

Returns

IMongoQuery

An IMongoQuery that represents the text search.

Text(string, string)

Generate a text search query that tests whether the given search string is present using the specified language's rules. Specifies use of language appropriate stop words, stemming rules etc.

public static IMongoQuery Text(string searchString, string language)

Parameters

searchString string

The search string.

language string

The language to restrict the search by.

Returns

IMongoQuery

An IMongoQuery that represents the text search for the particular language.

Text(string, TextSearchOptions)

Generate a text search query that tests whether the given search string is present using the specified language's rules. Specifies use of language appropriate stop words, stemming rules etc.

public static IMongoQuery Text(string searchString, TextSearchOptions options)

Parameters

searchString string

The search string.

options TextSearchOptions

The text search options.

Returns

IMongoQuery

An IMongoQuery that represents the text search for the particular language.