choosing query field in system.profile

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.6.8
    • Component/s: Shell
    • None
    • ALL
    • Hide

      db.coll.setProfilingLevel(2)
      db.system.profile.find({query: {$exists:1}})
      db.system.profile.find({query: {$exists:1}}).count()

      Show
      db.coll.setProfilingLevel(2) db.system.profile.find({query: {$exists:1}}) db.system.profile.find({query: {$exists:1}}).count()
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      in a database where profiling is activated, if I query the existence of query attribute in system.profile it will get the following error:
      error:

      { "$err" : "Can't canonicalize query: BadValue unknown top level operator: $exists", "code" : 17287 }

      but if I add .count() to the end of this query, I will receive the number of such documents.

              Assignee:
              Unassigned
              Reporter:
              Parinaz Ameri
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: