Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4932

Document that countDocuments() uses $match and may not support the same filters as find/count commands

    • Type: Icon: Spec Change Spec Change
    • Resolution: Works as Designed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: CRUD
    • Hide

      DRIVERS-2728:
      Drivers must document restrictions for filters in the countDocuments API that result from the API using aggregation pipeline.

      Suggested wording:

      Due to countDocuments using the $match aggregation pipeline stage, certain query operators cannot be used in countDocuments. This includes the $where and $near query operators, among others. Details can be found in the documentation for the $match aggregation pipeline stage.

      The documentation link for $match is https://www.mongodb.com/docs/manual/reference/operator/aggregation/match/#restrictions.

      Show
      DRIVERS-2728 : Drivers must document restrictions for filters in the countDocuments API that result from the API using aggregation pipeline. Suggested wording: Due to countDocuments using the $match aggregation pipeline stage, certain query operators cannot be used in countDocuments. This includes the $where and $near query operators, among others. Details can be found in the documentation for the $match aggregation pipeline stage. The documentation link for $match is https://www.mongodb.com/docs/manual/reference/operator/aggregation/match/#restrictions .
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      This ticket was split from DRIVERS-2728, please see that ticket for a detailed description.

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: