-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.7
-
Component/s: Aggregation Framework
-
None
-
ALL
Hı, good work
I found an bug
The complex consists of the following ways
1.) aggregation framework
2.) date(ISODate) field
3.) createIndex(
)
4.) run query (if dropIndex or remove sort field everything is ok
my query:
db.messages.aggregation([{ "$match": { "$and": [{ "recipient_id": 1607389 }, { "deletedbyrecipient": 0 }, { "blocked": 0 }] } }, { "$sort": { "date": -1/*if indexed very slovly worked , if dropIndex no problem*/ } }, { "$group": { "_id": "$sender_id", "id": { "$first": "$_id" }, "smileid": { "$first": "$_id" }, "blocked": { "$first": "$blocked" }, "date": { "$first": "$date" }, "deletedbyrecipient": { "$first": "$deletedbyrecipient" }, "deletedbysender": { "$first": "$deletedbysender" }, "seen": { "$first": "$seen" }, "recipient_id": { "$first": "$recipient_id" }, "sender_id": { "$first": "$sender_id" }, "unseencount": { "$sum": { "$cond": ["$seen", 0, 1] } } } }, { "$sort": { "date": -1 } }, { "$limit": 10 }, { "$skip": 0 }]);
- is related to
-
SERVER-7568 Aggregation framework favors non-blocking sorts
- Closed