$bucketAuto for number facets
As a developer, I would like to have functionality for NumberFacets similar to the $bucketAuto operator, so that I can define the number of buckets I want instead of setting the boundaries myself.
This function is helpful in situations where you don't know the boundaries or can't calculate them easily.
Example:
myNumberFacet: {
type: 'number'
path: 'path.to.my.field'
buckets: 1000
}
10
votes
![](https://secure.gravatar.com/avatar/8eaa80aae93b59f919f117524cddec96?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Jonas Trettin commented
This is a really useful function. In some use cases, you really don't know the boundaries beforehand. In some cases, you don't even know the min/max values.