On 25 Aug 2010, at 10:19, Alexander Klimetschek wrote: > On Wed, Aug 25, 2010 at 10:43, Ian Boston <[email protected]> wrote: >> Is there a count(*) function in JCR queries? > > No, but adding an "order by @jcr:score" will force the Jackrabbit > implementation to count. It is slower than not doing so, but any other > count() function will be slow as well, afaics, because - as you noted > - of the required ACL and other checks that need to be done on top of > the Lucene index.
yes, we've tried to avoid that since most result sets are > 20k items although the user is only ever interested in the first few pages and will accept a count feeback of "> 1000". Unfortunately we don't have enough data on all the content and keywords to do a statistical estimate of the number of items in a result set... and even if we did, permissions would make that rather pointless. But thank you for the pointer. Ian > > Regards, > Alex > > -- > Alexander Klimetschek > [email protected]
