Skip to content

Commit 7c0c6b1

Browse files
author
Oliver Lloyd
committed
Added an example for an aggregate key as this was not clear.
1 parent cbd811d commit 7c0c6b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/reference/aggregation.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ The current pipeline operators are:
423423
a single field from the documents in the pipeline, a previously computed
424424
value, or an aggregate key made up from several incoming fields.
425425

426+
.. note::
427+
428+
An aggregate key takes the format: ``{myKeyName: { author:true, myOtherField:true , YetAnotherField:true}}``.
429+
426430
Every group expression must specify an ``_id`` field.
427431
You may specify the ``_id`` field as a dotted
428432
field path reference, a document with multiple fields enclosed in

0 commit comments

Comments
 (0)