Click or drag to resize

SearchFacetBuilder<TDocument>.Date<TField> Method (String, Expression<Func<TDocument, TField>>, IEnumerable<DateTime>, 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.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax
public SearchFacet<TDocument> Date<TField>(
	string name,
	Expression<Func<TDocument, TField>> path,
	IEnumerable<DateTime> boundaries,
	string default = null
)

Parameters

name
Type: System.String
The name of the fact.
path
Type: System.Linq.Expressions.Expression<Func<TDocument, TField>>
The field path to facet on.
boundaries
Type: System.Collections.Generic.IEnumerable<DateTime>
A list of date values that specify the boundaries for each bucket.
default (Optional)
Type: System.String
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: SearchFacet<TDocument>
A date search facet.
See Also