Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-8965

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

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: Server
    • Labels:
      None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              1 year, 25 weeks, 1 day ago