From 97effea2ffc0082a1af4ae13d254fdabe2ea5aed Mon Sep 17 00:00:00 2001 From: astaple Date: Tue, 26 Jun 2012 12:29:04 -0700 Subject: [PATCH] SERVER-6131 Correct description of behavior when $unwind is applied to an empty array. (The specified field is dropped from the result.) --- source/reference/aggregation.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index ea44dfa0c6a..4e124c2ed72 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -406,8 +406,9 @@ The current pipeline operators are: not an array, :mongodb:func:`aggregate()` generates an error. - If you specify a target field for :pipeline:`$unwind` that - holds an empty array (``[]``), then the document passes - through unchanged. + holds an empty array (``[]``), then that field is removed + from the result while all other fields are passed through + unchanged. .. pipeline:: $group