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.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax public SearchFacet<TDocument> Date<TField>(
string name,
Expression<Func<TDocument, TField>> path,
IEnumerable<DateTime> boundaries,
string default = null
)
Public Function Date(Of TField) (
name As String,
path As Expression(Of Func(Of TDocument, TField)),
boundaries As IEnumerable(Of DateTime),
Optional default As String = Nothing
) As SearchFacet(Of TDocument)
member Date :
name : string *
path : Expression<Func<'TDocument, 'TField>> *
boundaries : IEnumerable<DateTime> *
?default : string
(* Defaults:
let _default = defaultArg default null
*)
-> SearchFacet<'TDocument>
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:
SearchFacetTDocumentA date search facet.
See Also