Method Search
Search<TResult, TNewResult>(IAggregateFluent<TResult>, SearchDefinition<TResult>, FieldDefinition<TResult, IEnumerable<TNewResult>>, SearchOptions<TResult>)
Appends a $search stage to the pipeline, returning documents from a nested scope.
public static IAggregateFluent<TNewResult> Search<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, SearchDefinition<TResult> searchDefinition, FieldDefinition<TResult, IEnumerable<TNewResult>> returnScope, SearchOptions<TResult> searchOptions = null)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
searchDefinitionSearchDefinition<TResult>The search definition.
returnScopeFieldDefinition<TResult, IEnumerable<TNewResult>>The level of nested documents to return.
searchOptionsSearchOptions<TResult>The search options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
TNewResultThe type of the new result.
Search<TResult, TNewResult>(IAggregateFluent<TResult>, SearchDefinition<TResult>, Expression<Func<TResult, IEnumerable<TNewResult>>>, SearchOptions<TResult>)
Appends a $search stage to the pipeline, returning documents from a nested scope.
public static IAggregateFluent<TNewResult> Search<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, SearchDefinition<TResult> searchDefinition, Expression<Func<TResult, IEnumerable<TNewResult>>> returnScope, SearchOptions<TResult> searchOptions = null)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
searchDefinitionSearchDefinition<TResult>The search definition.
returnScopeExpression<Func<TResult, IEnumerable<TNewResult>>>The level of nested documents to return.
searchOptionsSearchOptions<TResult>The search options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
TNewResultThe type of the new result.