- 
    Type:
Improvement
 - 
    Resolution: Unresolved
 - 
    Priority:
Major - P3
 - 
    None
 - 
    Affects Version/s: None
 - 
    Component/s: Aggregation Framework
 
- 
        Query Optimization
 - 
        Fully Compatible
 - 
        Query 12 (04/04/16)
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
As part of SERVER-4506, the $geoNear stage accepts a 'query' parameter which is an additional filter to apply to results returned from the geoNear. In a pipeline that has a $geoNear stage followed by a $match stage, we should set the query parameter of the geoNear to the $match, which pushes the matching logic down into the query subsystem.
- depends on
 - 
                    
SERVER-22949 Remove default limit from $geoNear aggregation stage
-         
 - Closed
 
 -         
 
- is duplicated by
 - 
                    
SERVER-4506 aggregation: optimize by pushing matches to earlier in a pipeline
-         
 - Closed
 
 -