Count does not obey limit()

XMLWordPrintableJSON

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

      Count does not obey limit() parameter when passed. Limiting the range of a count can be useful when you only wish to know if you have at least a certain number of matching documents.

      Count

      > db.foo.find().limit(100).count();
      2994
      

      Itcount

      > db.foo.find().limit(100).itcount();
      100
      

            Assignee:
            Unassigned
            Reporter:
            David Hows (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: