Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1681

Count maxing out at 1000

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None

    Description

      Here is the example code:

      IMongoCollection<T> collection = _database.GetCollection<T>(name);
      return Convert.ToInt32(await collection.CountAsync(filter, new CountOptions()

      { Limit = 99999999}

      ));

      With a blank filter there are thousands of documents in the collection. Running collection.count() directly on the console returns the correct number. Running this code against the same exact collection and server returns a max of 1000.

      Attachments

        Activity

          People

            Unassigned Unassigned
            morgan@latesnacker.com Morgan Abel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: