@@ -249,10 +249,11 @@ Sorting with a Compound Sort Pattern on Multiple Array Fields with ``aggregate``
249
249
250
250
In MongoDB 3.6, when sorting in an
251
251
:doc:`aggregation pipeline </core/aggregation-pipeline/>`, MongoDB can
252
- no longer sort with keys that are *parallel arrays*. Arrays are
253
- considered parallel if they are sibling elements of the BSON object.
254
- Sort keys involving nested arrays are not considered parallel, nor are
255
- sort keys which share the same array as a prefix.
252
+ no longer sort documents which contain *parallel arrays* in the fields
253
+ being sorted on. Arrays are considered parallel if they are sibling
254
+ elements of the BSON object. Sort keys involving nested arrays are not
255
+ considered parallel, nor are sort keys which share the same array as a
256
+ prefix.
256
257
257
258
.. note::
258
259
@@ -309,9 +310,9 @@ sort keys which share the same array as a prefix.
309
310
db.coll.aggregate([ { $sort: {a: 1, b: 1} } ])
310
311
311
312
MongoDB cannot sort on both the ``a`` and ``b`` fields because
312
- in the document with ``_id : 1`` , both the ``a`` and ``b `` fields
313
- are arrays. As a result, MongoDB encounters a parallel array during
314
- sort key generation and returns an error.
313
+ in the document with ``_id : 1`` , the sibling fields ``a `` and
314
+ ``b`` are both arrays. As a result, MongoDB encounters a parallel
315
+ array during sort key generation and returns an error.
315
316
316
317
Update Operation Changes
317
318
------------------------
0 commit comments