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

$query unsupported operator

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • ALL

    Description

      According to the latest docs the following should be supported:

      When I run the following query I get results:

      db.mycollection.find({"$query":{}, "$orderby":{"myfield":1});

      When I run the following explain:

      db.mycollection.find({"$query":{}, "$orderby":{"myfield":1}).explain();

      I get the following error:

      2014-05-29T15:29:46.939-0700 error: {
      	"$err" : "Can't canonicalize query: BadValue unknown top level operator: $query",
      	"code" : 17287
      } at src/mongo/shell/query.js:131

      Why can't I do an explain on a valid query?

      Attachments

        Activity

          People

            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            steve.owens@disney.com Steve Owens
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: