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

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

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

      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.

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

              Created:
              Updated:
              Resolved: