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

Query parser does not correctly handle geonear predicates with other predicates in the same field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.2
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Sprint:
      Query 10 (02/22/16)

      Description

      We should allow queries such as

      a: { $near: ..., $within: ... }

      , but geonear predicates cannot be combined with other predicates in the same field, so we have to do for example,

      $and: [ { a: { $near:... } }, { a: { $within: ... } } ]

      . Also, ordering shouldn't matter.

      In addition, for legacy formats for geonear queries, currently ordering matters and is incorrect in that for example,

      a: { $eq: ..., $near: ..., $maxDistance: ... }

      would error, but

      a: { $near: ..., $eq: ..., $maxDistance: ... }

      would ignore the $eq.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benjamin.murphy Benjamin Murphy
              Reporter:
              qingyang.chen Qingyang Chen
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: