Table of Contents

Method Term

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

Term(SearchPathDefinition<TDocument>, SearchQueryDefinition)

Creates a span clause that matches a single term.

public SearchSpanDefinition<TDocument> Term(SearchPathDefinition<TDocument> path, SearchQueryDefinition query)

Parameters

path SearchPathDefinition<TDocument>

The indexed field or fields to search.

query SearchQueryDefinition

The string or strings to search for.

Returns

SearchSpanDefinition<TDocument>

A term span clause.

Term<TField>(Expression<Func<TDocument, TField>>, SearchQueryDefinition)

Creates a span clause that matches a single term.

public SearchSpanDefinition<TDocument> Term<TField>(Expression<Func<TDocument, TField>> path, SearchQueryDefinition query)

Parameters

path Expression<Func<TDocument, TField>>

The indexed field or fields to search.

query SearchQueryDefinition

The string or string to search for.

Returns

SearchSpanDefinition<TDocument>

A term span clause.

Type Parameters

TField

The type of the field.