- 
    Type:
New Feature
 - 
    Resolution: Done
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: None
 - 
    Component/s: Aggregation Framework
 - 
    None
 
- 
        Fully Compatible
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
Some analytics queries can't be done by the aggregation framework only for the lack of an array size operator:
var a1 = db.runCommand({ aggregate:"track", pipeline:[ {$group: { _id: "$urllower", visits: {$sum: "$visits"}, kw: {$addToSet: "$kw"} }, {$project: { urllower: "$_id", visits: 1, keywords: {$size: "$kw"} } ]});
The request here is for the $size operator at the end of the projection, which would give the size of the keyword array being built up here.
I choose $size for the name because we already use that for the same meaning here:
http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24size .
- is related to
 - 
                    
SERVER-447 new aggregation framework
-         
 - Closed
 
 -         
 
- related to
 - 
                    
SERVER-8582 Extend document expression language in aggregation to support advanced document filtering.
-         
 - Closed
 
 -