Method Search
Search<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SearchDefinition<TOutput>, SearchHighlightOptions<TOutput>, string, SearchCountOptions, bool, bool)
Appends a $search stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Search<TInput, TOutput>(this PipelineDefinition<TInput, TOutput> pipeline, SearchDefinition<TOutput> searchDefinition, SearchHighlightOptions<TOutput> highlight = null, string indexName = null, SearchCountOptions count = null, bool returnStoredSource = false, bool scoreDetails = false)
Parameters
pipeline
PipelineDefinition<TInput, TOutput>The pipeline.
searchDefinition
SearchDefinition<TOutput>The search definition.
highlight
SearchHighlightOptions<TOutput>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
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.
Search<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SearchDefinition<TOutput>, SearchOptions<TOutput>)
Appends a $search stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Search<TInput, TOutput>(this PipelineDefinition<TInput, TOutput> pipeline, SearchDefinition<TOutput> searchDefinition, SearchOptions<TOutput> searchOptions)
Parameters
pipeline
PipelineDefinition<TInput, TOutput>The pipeline.
searchDefinition
SearchDefinition<TOutput>The search definition.
searchOptions
SearchOptions<TOutput>The search options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TOutput
The type of the output documents.