Details
-
New Feature
-
Resolution: Duplicate
-
Minor - P4
-
None
-
2.4.1
-
None
Description
It would be good if querying can support filtering of recent documents based on certain document fields. For example:
> db.logs.find()
|
{
|
'id': ObjectId("50ad8d451d41c8fc58000003")
|
'name': 'Sample Log 1',
|
'uploaded_at: ISODate("2013-03-14T01:00:00+01:00"),
|
'case_id: '50ad8d451d41c8fc58000099',
|
'tag_doc': {
|
'group_x: ['TAG-1','TAG-2'],
|
'group_y': ['XYZ']
|
}
|
},
|
{
|
'id': ObjectId("50ad8d451d41c8fc58000004")
|
'name': 'Sample Log 2',
|
'uploaded_at: ISODate("2013-03-15T01:00:00+01:00"),
|
'case_id: '50ad8d451d41c8fc58000099'
|
'tag_doc': {
|
'group_x: ['TAG-1'],
|
'group_y': ['XYZ']
|
}
|
}
|
Both documents contain the same case_id. The user can filter out all the most recently uploaded document for each unique combination of fields, for example case_id and group_y. This is helpful in aggregating on a large collection of multiple version of documents.
Attachments
Issue Links
- duplicates
-
SERVER-9366 Expose projection (aggregation) operators in regular find queries
-
- Closed
-
-
SERVER-9507 Optimize $sort+$group+$first pipeline to avoid full index scan
-
- Closed
-