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

currentOp ignores $near and $text predicates

    XMLWordPrintableJSON

Details

    • Query
    • ALL

    Description

      The currentOp command (and the equivalent pseudocommand "inprog") incorrectly ignores any $near or $text predicates passed in as a filter. Instead, an error should be returned at parse time if these predicates are used.

      See, for example:

      > db.adminCommand("currentOp", {$text: {$search: "hello"}}).inprog.length
      1  // Unexpected: no operations should match.
      > db.adminCommand("currentOp", {a: {$near: [0, 0]}}).inprog.length
      1  // Unexpected: no operations should match.
      

      I believe that this behavior has existed since the introduction of the $text and $near predicates.

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: