Allow $near/$nearSphere on a view

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • 163
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In view resolution we need to translate all the parts of a .find() query into equivalent aggregation stages.  Currently $near and $nearSphere aren't supported on views because syntactically they're part of the .find() predicate, which becomes a $match, but semantically they also sort the results, which $match can't.

      We should be able to translate any .find() predicate to a combination of $geoNear and $match stages.  We'll need to make $geoNear's 'distanceField' argument optional.

              Assignee:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              David Percy (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: