Operations: How to Get Collection Statistics

GetCollectionStatisticsOperation is used to return total count of documents, conflicts and document count in each collection.


public GetCollectionStatisticsOperation()

public class CollectionStatistics
    public int CountOfDocuments { get; set; }
    public int CountOfConflicts { get; set; }

    public Dictionary<string, long> Collections { get; set; }
Return Value
CountOfDocuments int Total documents count
CountOfConflicts int Total conflicts count
Collections Dictionary<string, long> Dictionary which maps collection name to document count


CollectionStatistics stats = store.Maintenance.Send(new GetCollectionStatisticsOperation());