From 7c0c6b1167319d814157b8cd4c9c7605eef162d3 Mon Sep 17 00:00:00 2001 From: Oliver Lloyd Date: Wed, 11 Jul 2012 00:44:16 +0200 Subject: [PATCH] Added an example for an aggregate key as this was not clear. --- source/reference/aggregation.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index c106ec9aa9e..3c2bdc98568 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -423,6 +423,10 @@ The current pipeline operators are: a single field from the documents in the pipeline, a previously computed value, or an aggregate key made up from several incoming fields. + .. note:: + + An aggregate key takes the format: ``{myKeyName: { author:true, myOtherField:true , YetAnotherField:true}}``. + Every group expression must specify an ``_id`` field. You may specify the ``_id`` field as a dotted field path reference, a document with multiple fields enclosed in