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

$query unsupported operator

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • ALL

      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?

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

              Created:
              Updated:
              Resolved: