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

Cannot use $query together with $comment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Operating System:
      ALL

      Description

      I wanted to use the special $comment field with pymongo for adding generic information about what code triggered the query.

      To do this you need to do collection.find(

      {"$query": ..., "$comment": ...}

      ).
      But this breaks queries trying to count, always giving 0 as result.

      Same goes for the cli.

      This makes the usability of $comment much more complicated since you need to keep track of when your code might count on the cursor.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team
              Reporter:
              balboah Johnny Boy
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: