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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.5.3
    • Fix Version/s: 2.5.4
    • Component/s: Geo, Querying
    • Labels:
    • Environment:
      Mac OSX 10.7.5
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: