AnsweredAssumed Answered

Is it possible to get count of query result in very short time?

Question asked by woong on Jun 27, 2017
Latest reply on Jun 28, 2017 by afaust

In my web service, I want my web-app to show nodes list with pagination.

So, I need total count for some afts query.

when I query using Alfresco Rest API(api/-default-/public/search/versions/1/search), getting a result consumes pretty long time (approximately 3 seconds for 2000 nodes. and this would be increased linearly).


I wanted to decrease query time(just get count of query result). and I have tried some ways to solve this problem.


1. when I query using Alfresco admin console(node-browser), I could get count(with results) very faster than what i did So, I copied that HTTP request then request exactly same. But I could not get the result what i want. That HTTP response included some javascript codes.


2. I have accessed Alfresco's DB(postgreSQL). But I could not translate afts query to postgreSQL query...


3. I have queried to Alfresco's Solr. I could get query count very fast but the result was different with Alfresco Rest API.



Is there any way to get count of query in very short time??