Hi, On Fri, Oct 25, 2013 at 12:24 AM, Torgeir Veimo <[email protected]> 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. BR, Jukka Zitting
