Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58443

Allow $near/$nearSphere on a view

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • None
    • Query Optimization
    • 163

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              backlog-query-optimization Backlog - Query Optimization
              david.percy@mongodb.com David Percy
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: