SearchFacetBuilderTDocumentNumberTField Method (String, ExpressionFuncTDocument, TField, IEnumerableBsonValue, String) |
Creates a facet that determines the frequency of numeric values by breaking the search
results into separate ranges of numbers.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax public SearchFacet<TDocument> Number<TField>(
string name,
Expression<Func<TDocument, TField>> path,
IEnumerable<BsonValue> boundaries,
string default = null
)
Public Function Number(Of TField) (
name As String,
path As Expression(Of Func(Of TDocument, TField)),
boundaries As IEnumerable(Of BsonValue),
Optional default As String = Nothing
) As SearchFacet(Of TDocument)
member Number :
name : string *
path : Expression<Func<'TDocument, 'TField>> *
boundaries : IEnumerable<BsonValue> *
?default : string
(* Defaults:
let _default = defaultArg default null
*)
-> SearchFacet<'TDocument>
Parameters
- name
- Type: SystemString
The name of the facet. - path
- Type: System.Linq.ExpressionsExpressionFuncTDocument, TField
The field path to facet on. - boundaries
- Type: System.Collections.GenericIEnumerableBsonValue
A list of numeric 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 number search facet.
See Also