jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Park <mintb...@gmail.com>
Subject Re: Queries not working in Jackrabbit 2.0
Date Wed, 17 Feb 2010 13:55:28 GMT
Hi! You can get size if you use 'order by' clause in your query.

Thanks!

On Feb 17, 2010, at 10:13 PM, Jacco van Weert <1111software@gmail.com>  
wrote:

>
> Achhhh... now I see... I did rely on the getSize() method of the  
> NodeIterator.
>
> Looking through the docs and the mailinglist I see that there is no  
> real way of retrieving the number of results?
>
> gr,
>
>    Jacco
>
>
>
> On Wed, Feb 17, 2010 at 10:44 AM, Jukka Zitting <jukka.zitting@gmail.com 
> > wrote:
> Hi,
>
> On Wed, Feb 17, 2010 at 10:18 AM, Jacco van Weert
> <1111software@gmail.com> wrote:
> > For some time I am battling with the queries in Jackrabbit v2.0.
> > For some reason all my query results (QueryResult .getNodes() ) are
> > resulting in a -1 size, I guess this indicates an error, otherwise  
> it should
> > be 0.
>
> "[...] In some implementations precise information about the number of
> elements may not be available. In such cases this method must return
> -1. [...]"
> http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/RangeIterator.html#getSize

> ()
>
> You'll get an exception if the query execution fails for some reason.
>
> BR,
>
> Jukka Zitting
>
>
>
> -- 
> -------------------------------------
> Jacco van Weert -- 1111software@gmail.com
> JCR Controller -- http://www.xs4all.nl/~weertj/jcr
> JeCARS -- http://kenai.com/projects/jecars
>

Mime
View raw message