Hi, I'm new to this product and I am developing an interface to return to user a number of documents. So basically I will writ a web interface to let user input a start date and an end date, then I search in our document system which is based on Alfresco (version 3.3) and return the documents within the specified period.
I meet a few issues,though:
1. The Alfresco API, as far as I know, returns the total number of documents and the first 1000 documents (or all documents if less than 1000). This takes a lot of time, and the time is proportional (not linear, though) to the total number of documents. Say, if the search specifies a period of 1 day and there are 900 documents, the API takes about 5 seconds to return all 900 documents and the number 900; If the search specifies 10 days and there are 8000 documents, it takes 30 seconds to return the first 1000 documents and the number 8000. Is there another API that can quickly return the total number of documents, without the documents themselves? Like so I can quickly respond to user and decide what to do next (for example to ask user to reduce the number of days to search)?
2. Now that the API only returns the first 1000 documents, if there are > 1000 documents, I have to call the API several times to get all the remaining documents by using some tricks (for example taking the time of the 1000th document and use that as the new start time to search again, but if there are a lot of documents user needs to wait a long time if I loop many times), is there another API that can return all docments, or offers 'paging' mechanism that I can just call in sequence to get all documents? However this is less critical as I can overcome it, slow though, the more critical issue is to quickly get the total number of documents.
Thanks!