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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • Server
    • None

    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

        Activity

          People

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

            Dates

              Created:
              Updated:
              1 year, 14 weeks, 2 days ago