Method Search
Search(SearchDefinition<TResult>, SearchHighlightOptions<TResult>, string, SearchCountOptions, bool, bool)
Appends a $search stage to the pipeline.
public virtual IAggregateFluent<TResult> Search(SearchDefinition<TResult> searchDefinition, SearchHighlightOptions<TResult> highlight = null, string indexName = null, SearchCountOptions count = null, bool returnStoredSource = false, bool scoreDetails = false)
Parameters
searchDefinition
SearchDefinition<TResult>The search definition.
highlight
SearchHighlightOptions<TResult>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
- IAggregateFluent<TResult>
The fluent aggregate interface.
Search(SearchDefinition<TResult>, SearchOptions<TResult>)
Appends a $search stage to the pipeline.
public virtual IAggregateFluent<TResult> Search(SearchDefinition<TResult> searchDefinition, SearchOptions<TResult> searchOptions)
Parameters
searchDefinition
SearchDefinition<TResult>The search definition.
searchOptions
SearchOptions<TResult>The search options.
Returns
- IAggregateFluent<TResult>
The fluent aggregate interface.