Click or drag to resize

IFulltextQueryTDocumentWithSubqueryTSubqueryResult Method

Defines a subquery from which the results for this query are selected.

Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.0.0
Syntax
IFulltextQuery<TSubqueryResult> WithSubquery<TSubqueryResult>(
	Expression<Func<IFulltextQuery<TDocument>, IFulltextQuery<TSubqueryResult>>> expression
)

Parameters

expression  ExpressionFuncIFulltextQueryTDocument, IFulltextQueryTSubqueryResult
The subquery expression.

Type Parameters

TSubqueryResult
The result type returned by the subquery.

Return Value

IFulltextQueryTSubqueryResult
The current instance.
Example
using (IFulltextSession fulltextSession = fulltextStore.StartSession()) { var results = fulltextSession.Query<Product>(). WithSubquery(subquery => subquery.Match("a product"). Take(10000)). OrderBy(p => p.Price). Take(50000). ToList(); }
See Also