On 25 Aug 2010, at 07:55, Ard Schrijvers wrote: > Also note that the faceted navigation is exposed with including an > authorization filter: thus, we expose authorized correct counts > faceted navigation, all blistering fast as it is all in Lucene.
Ard, I am interested in the counting. Is this done by counting the number of results from a search or maintaining an aggregate counter by events, of by adding a low level Lucene class to generate the count ? I have been looking at generating aggregate counts of facets on large datasets, and have not found a solution other than retrieving all the hits from a search. JR2.1 appears to be entirely lazy in its retrieval of results and hence there are no totals until the entire set is retrieved. Thats fine for small result sets, but for large ones its a killer. At the moment the best we can do is to count upto some number, (eg 500) and beyond that say there are > 500. Is there a count(*) function in JCR queries? I dont think this is a problem specific to Jackrabbit, rather its a problem for any search index on a ACL'd data set where the range of ACL combinations is greater than the number of items in the set (ie cardinality of the inverted index is so great its pointless indexing) Ian
