Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas Search
Created by Guest
Created on Sep 29, 2022

$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 }
  • Guest
    Sep 29, 2022
    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.