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
pipelinePipelineDefinition<TInput, TOutput>The pipeline.
searchDefinitionSearchDefinition<TOutput>The search definition.
highlightSearchHighlightOptions<TOutput>The highlight options.
indexNamestringThe index name.
countSearchCountOptionsThe count options.
returnStoredSourceboolFlag that specifies whether to perform a full document lookup on the backend database or return only stored source fields directly from Atlas Search.
scoreDetailsboolFlag 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
TInputThe type of the input documents.
TOutputThe 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
pipelinePipelineDefinition<TInput, TOutput>The pipeline.
searchDefinitionSearchDefinition<TOutput>The search definition.
searchOptionsSearchOptions<TOutput>The search options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TOutputThe type of the output documents.
Search<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, SearchDefinition<TIntermediate>, FieldDefinition<TIntermediate, IEnumerable<TOutput>>, SearchOptions<TIntermediate>)
Appends a $search stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Search<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, SearchDefinition<TIntermediate> searchDefinition, FieldDefinition<TIntermediate, IEnumerable<TOutput>> returnScope, SearchOptions<TIntermediate> searchOptions)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
searchDefinitionSearchDefinition<TIntermediate>The search definition.
returnScopeFieldDefinition<TIntermediate, IEnumerable<TOutput>>The level of nested documents to return.
searchOptionsSearchOptions<TIntermediate>The search options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TOutputThe type of the output documents.