Click or drag to resize

IFulltextQueryTDocumentHaving Method

Filter the aggregated results of this query by the given predicate. Supported with Sphinx 2.2.1 and up.

Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.0.0
Syntax
IFulltextQuery<TDocument> Having(
	Expression<Func<TDocument, bool>> predicate
)

Parameters

predicate  ExpressionFuncTDocument, Boolean

Return Value

IFulltextQueryTDocument
The current instance.
Exceptions
ExceptionCondition
ArgumentNullExceptionOccurs when predicate is null.
InvalidOperationExceptionOccurs when this method called more than once for query.
Example
using (IFulltextSession fulltextSession = fulltextStore.StartSession()) { var results = fulltextSession.Query<Product>(). Match("a product"). GroupBy(p => p.VendorId). Select(p => new { p, Count = Projection.Count() }). Having(p => p.Count > 1). ToList(); }
See Also