-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.4
-
Component/s: Aggregation Framework
-
None
-
ALL
Cannot sort with aggregation when we have more than one key to sort and one of this are an array entry
No problem if only one key specified:
collection.aggregate([{
$sort:{
"events.0.date": -1
}}])
Problem if more than one key specified and one of this is an array entry:
collection.aggregate([{ $sort:{ "events.0.date": -1, "_id":1 }}])
I checked :
collection.aggregate([{ $sort:{ "date": -1, "_id":1 }}])
Sorry for my english
- duplicates
-
SERVER-24748 Aggregation does not provide a way to access a specific element of an array
- Backlog