jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: query using "order by @jcr:score" returns size == -1 after upgrading 2.6.1 -> 2.6.3
Date Sat, 26 Oct 2013 20:44:04 GMT

On Fri, Oct 25, 2013 at 12:24 AM, Torgeir Veimo <torgeir.veimo@gmail.com> wrote:
> Furthermore it seems it happens when query limit <= result size. If I
> set limit to one higher than the size of the result set, it correctly
> gives the correct size.

The reason for this behavior is that when you set the limit on the
query Jackrabbit will stop counting when the limit is reached, and
thus it won't know what the total number of results without the limit
would be. The reason why it worked before JCR-3402 is that we used a
guess based on the raw number of Lucene matches without considering
things like read access controls, which is a potential security issue
as it could result in read-protected information leaking through the
query system.


Jukka Zitting

View raw message