cancel
Showing results for 
Search instead for 
Did you mean: 

Search count(*)

okto
Champ in-the-making
Champ in-the-making
hi!!!

I'm currently working with the Alfresco Webservices and I'd found an (really) annoying thing… I can't found via Lucene syntax a way to know how much results are returned by the query [like in the SQL query count (*) from TABLE].
My query always returns 1000 results (in the repository.properties I had the line system.acl.maxPermissionChecks=1000) but I have to know how much nodes fulfill my query (even thousands of them).

Thanks a lot!!!
Okto
1 REPLY 1

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

You should be able to override any property using custom-repository.properties.

http://wiki.alfresco.com/wiki/Repository_Configuration

Also when you query using webservices you should be able to get the count from the resultset.

QueryResult result=repoService.query(STORE,new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/*\""),true);
       
  ResultSet rs=result.getResultSet();

long count=rs.getTotalRowCount();

Query doesn't return the actual contents from the repository.

To read the content you need to use the contentService.


Best Regards,
Shagul Khaja