Querying 2d indexes with $exists:false fails and the error message is incorrect

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.5.4
    • Affects Version/s: 2.5.3
    • Component/s: Geo, Querying
    • Environment:
      Mac OSX 10.7.5
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When attempting to find ungeocoded documents I'm getting a misleading error.

      db.accounts.find({"locations.coordinates":{"$exists":false}})

      returns this error;

      "$err" : "geo field only has 1 element :: caused by :: $exists: false",
      "code" : 13068

      None of my coordinates have only one element.

      db.accounts.find({"locations.coordinates":{"$exists":true}})

      is successful.

        1. server9389.js
          0.8 kB
          David Storch

              Assignee:
              Unassigned
              Reporter:
              Steve Schlotter
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: