Click or drag to resize

PipelineStageDefinitionBuilderSearchTInput Method

Creates a $search stage.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax
public static PipelineStageDefinition<TInput, TInput> Search<TInput>(
	SearchDefinition<TInput> searchDefinition,
	SearchHighlightOptions<TInput> highlight = null,
	string indexName = null,
	SearchCountOptions count = null,
	bool returnStoredSource = false
)

Parameters

searchDefinition
Type: MongoDB.Driver.SearchSearchDefinitionTInput
The search definition.
highlight (Optional)
Type: MongoDB.Driver.SearchSearchHighlightOptionsTInput
The highlight options.
indexName (Optional)
Type: SystemString
The index name.
count (Optional)
Type: MongoDB.Driver.SearchSearchCountOptions
The count options.
returnStoredSource (Optional)
Type: SystemBoolean
Flag that specifies whether to perform a full document lookup on the backend database or return only stored source fields directly from Atlas Search.

Type Parameters

TInput
The type of the input documents.

Return Value

Type: PipelineStageDefinitionTInput, TInput
The stage.
See Also