Skip to content

Commit 507e312

Browse files
(DOCS-13770): Clarifications to bucketAuto
1 parent b41f64b commit 507e312

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

source/reference/operator/aggregation/bucketAuto.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,20 @@ Definition
2323
documents into the specified number of buckets.
2424

2525
Each bucket is represented as a document in the output. The document
26-
for each bucket contains an ``_id`` field, whose value specifies the
27-
inclusive lower bound and the exclusive upper bound for the bucket,
28-
and a ``count`` field that contains the number of documents in the
29-
bucket. The ``count`` field is included by default when the
30-
``output`` is not specified.
26+
for each bucket contains:
27+
28+
- An ``_id`` object that specifies the bounds of the bucket.
29+
30+
- The ``_id.min`` field specifies the inclusive lower bound for the
31+
bucket.
32+
33+
- The ``_id.max`` field specifies the upper bound for the bucket.
34+
This bound is exclusive for all buckets except the final
35+
bucket in the series, where it is inclusive.
36+
37+
- A ``count`` field that contains the number of documents in the
38+
bucket. The ``count`` field is included by default when the
39+
``output`` document is not specified.
3140

3241
The :pipeline:`$bucketAuto` stage has the following form:
3342

0 commit comments

Comments
 (0)