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

Count does not obey limit()

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.5.1
    • None
    • None
    • ALL

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            david.hows David Hows
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: