Method Search
Search<TInput>(SearchDefinition<TInput>, SearchHighlightOptions<TInput>, string, SearchCountOptions, bool, bool)
Creates a $search stage.
public static PipelineStageDefinition<TInput, TInput> Search<TInput>(SearchDefinition<TInput> searchDefinition, SearchHighlightOptions<TInput> highlight = null, string indexName = null, SearchCountOptions count = null, bool returnStoredSource = false, bool scoreDetails = false)
Parameters
searchDefinition
SearchDefinition<TInput>The search definition.
highlight
SearchHighlightOptions<TInput>The highlight options.
indexName
stringThe index name.
count
SearchCountOptionsThe count options.
returnStoredSource
boolFlag that specifies whether to perform a full document lookup on the backend database or return only stored source fields directly from Atlas Search.
scoreDetails
boolFlag that specifies whether to return a detailed breakdown of the score for each document in the result.
Returns
- PipelineStageDefinition<TInput, TInput>
The stage.
Type Parameters
TInput
The type of the input documents.
Search<TInput>(SearchDefinition<TInput>, SearchOptions<TInput>)
Creates a $search stage.
public static PipelineStageDefinition<TInput, TInput> Search<TInput>(SearchDefinition<TInput> searchDefinition, SearchOptions<TInput> searchOptions)
Parameters
searchDefinition
SearchDefinition<TInput>The search definition.
searchOptions
SearchOptions<TInput>The search options.
Returns
- PipelineStageDefinition<TInput, TInput>
The stage.
Type Parameters
TInput
The type of the input documents.