What is the best method to find out how many documents/records there are?

0 votes
storage.GetTotalRecords() gives me -1 storage.CountRecords() gives me the number I originally asked for in my query. And I read elsewhere that I shouldn't use CountByQuery because that is going to be depreciated.
asked Mar 25 in Unity by ant (13 points)

1 Answer

0 votes

Hi Ant,

You can use the Find All Document Count API to get the count of all document in the given database and the collection.

If you have any other concern, please let us know, we will be happy to help you.

Regards,

Priyanka Singh

App42 Team

answered Mar 25 by priyanka.singh (166 points)
Sorry how do I combine this with a query, as I don't want the count for all documents just those with certain values so that I can work out how many times I need to run FindDocumentByQueryWithPaging() in order to get all files.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...