Click or drag to resize

SearchFacetBuilderTDocumentDateTField Method (String, ExpressionFuncTDocument, TField, IEnumerableDateTime, String)

Creates a facet that narrows down search result based on a date.

Namespace:  MongoDB.Driver.Search
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public SearchFacet<TDocument> Date<TField>(
	string name,
	Expression<Func<TDocument, TField>> path,
	IEnumerable<DateTime> boundaries,
	string default = null
)

Parameters

name
Type: SystemString
The name of the fact.
path
Type: System.Linq.ExpressionsExpressionFuncTDocument, TField
The field path to facet on.
boundaries
Type: System.Collections.GenericIEnumerableDateTime
A list of date values that specify the boundaries for each bucket.
default (Optional)
Type: SystemString
The name of an additional bucket that counts documents returned from the operator that do not fall within the specified boundaries.

Type Parameters

TField
The type of the field.

Return Value

Type: SearchFacetTDocument
A date search facet.
See Also