Previously, one could do a
long totalCount = it.getSize();
Do you mean I need to do a
NodeIterator it = res.getNodes(); long totalCount = 0;
while (it.hasNext()) {
Node node = it.nextNode(); totalCount++;
}
Why I need to know the count is irrelevant. I don't think it's up to
the persistence layer to dictate policy for the user interface.
On 21 July 2014 20:39, Thomas Mueller <[email protected]> wrote:
> Hi,
>
> You would need to traverse the result. Which is a bad idea if the result
> is big.
>
> The question is: why do you need to know? Do you want to display a page
> number ("page 1 of 145")? I think that's not a good idea, for multiple
> reasons.
>
> Regards,
> Thomas
>
> On 16/07/14 19:32, "Torgeir Veimo" <[email protected]> wrote:
>
>>What's the correct approach to getting a total count from a query
>>result with apache oak?
>>
>>Using 'order by @jcr:score' doesn't seem to work as it does with
>>Jackrabbit.
>>
>>--
>>-Tor
>
--
-Tor