I tried upgrading from Jackrabbit 2.6.1 to 2.6.3, and now one of my queries return size of -1, even when sorting by @jcr:score.
If I add an additional parameter, then the qurey suddenly return a proper size value, as shown in this log output; 05:04:25,468 TRACE jcr.JcrAssetRepository.findAssets(), l: 655: using queryString: /jcr:root//content//*/element(*,ka:asset)[@ka:assetType = 'company' ] order by @jcr:score 05:04:25,605 TRACE jcr.JcrAssetRepository.toAssets(), l: 714: loading: 100, totalCount: -1 assets took -131ms 05:04:13,451 TRACE jcr.JcrAssetRepository.findAssets(), l: 655: using queryString: /jcr:root//content//*/element(*,ka:asset)[@ka:assetType = 'company' and jcr:contains(., '*test*') ] order by @jcr:score 05:04:13,520 TRACE jcr.JcrAssetRepository.toAssets(), l: 714: loading: 5, totalCount: 5 assets took -8ms Is there any other way than adding order by @jcr:score to ensure the total count is returned in version 2.6.2+ ? I'd assume this might caused by JCR-3402? (I only see this on my production server, not on my test or staging server, so it's hard to create a test case, or isolate the problem.) -- -Tor
