I have implemented server side pagination for one of my requirements in alfresco share. In which I am doing below things in a JS based webscript. 1. Fire a lucene query and get the total count of records from the result received 2. Perform the same query giving paging objects and prepare JSON response of resulted records.
I have observed that - getting the records count in step-1 above is taking a long time. Hence, the performance is degraded. I have around 15000+ records and it may get extended to more than it. I checked giving the hard-coded value for total count and then performance of the pagination is really good.
Could anyone please help me how can I get the count of records using lucene and get the good performance.
I am using Alfresco v 3.4.3. Could you please provide me the direction to achieve the good performance for getting the total count of records. If this is solved, then there is no other issue for me.