We're launching queries like that:
TYPE:"ts:FolderSet" and ANCESTOR:"workspace://StoreSpaces/234230..."
We need to count how many nodes are matching above condition instead of getting a list of nodes.
We're launching this query using /share TFS-Alfresco queries.
Any ideas?
Yeah. Since this type of query will have to use the SOLR index, simply use the "numberFound" attribute contained in the search response / result set. That gives you the total number of nodes matching that query (that the current user is allowed to see). You can always set the "maxItems" parameter for search to 1, so you don't get a lot of results back (can't set it to zero though).
I don't quite figure out how to get this "numberFound" field.
I've tried something like that, but I don't see the number of nodes.
You cannot from the Node Browser tool. You need to access the low-level ResultSet obtained by searching via the SearchService#query (Java) or Search#query (JavaScript) API operations. Alternatively, if you are looking for the whole number without permission checks (you are checking as admin after all), you can simply do a database query or check the SOLR index (schema browser) via its admin UI.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.