Click or drag to resize

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.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public SearchFacet<TDocument> Number<TField>(
	string name,
	Expression<Func<TDocument, TField>> path,
	IEnumerable<BsonValue> boundaries,
	string default = null
)

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: SearchFacetTDocument
A number search facet.
See Also