jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: How do I get the total size of nodes/rows from a QueryResult
Date Tue, 25 Oct 2011 14:48:38 GMT
On Tue, Oct 25, 2011 at 4:25 PM,  <Sascha.Theves@bosch-si.com> wrote:
> Hi all,
>
>
>
> I am currently switching to Jackrabbit 2.2.9 and have now a problem
> getting the total size of nodes/rows in a query result. In Jackrabbit
> 1.6 you could cast the QueryResult to QueryResultImpl and retrieve the
> total size from there. That is not possible with Jackrabbit 2.2.9
> because I always get a SimpleQueryResult which doesn`t provide the
> needed information. The total size is very important if you want to
> implement a pagination.

not sure if it is still the only way, but when adding an order by
clause you'd be able to get the actual size. Thus add something like

order by @jcr:score

if you use xpath

Regards Ard

>
>
>
> How do I get the total size of nodes or rows with Jackrabbit 2.2.9?
>
>
>
> Best regards
>
>
>
> Sascha Theves
>
>



-- 
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

Mime
View raw message