jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Gaeremynck <gaeremyn...@gmail.com>
Subject Re: NodeIterator.getSize() returns -1 for query with order by clause
Date Mon, 26 Apr 2010 09:13:29 GMT
Response inline
On 25 Apr 2010, at 21:32, Alexander Klimetschek wrote:

> On Fri, Apr 23, 2010 at 15:47, Simon Gaeremynck <gaeremyncks@gmail.com> wrote:
>> I'm aware that according to the spec -1 can be returned (for various performance
issues) and that's all fine.
>> But I thought you would be able to get the amount of results when the result set
count is smaller then the
>> resultFetchSize you can specify for SearchIndex in the repository.xml ?
> 
> Not necessarily, I believe. This was the case for Jackrabbit 1.x, if I
> am not mistaken.

I had a feeling it might be something like this.

> 
>> As previously stated, an order by gives a correct number, but as it is possible that
we might have huge datasets at some point,
>> I really don't want to sort them.
> 
> AFAIK "order by @jcr:score descending" is the default sort order, so I
> don't think it is way much slower than not sorting.

Thanks, I'll give it a try!

> 
>> This is also for doing paging, and we're already doing the "Page 1 of hundreds."
thing, but our UI developers are
>> complaining that it should be possible to get a count when they only get a small
resultset.
> 
> Any implementation that would by default count (ie. not having the -1
> option) would be slower, or as slow as adding that order by. The -1 is
> there to make it faster, if you don't need the count. I thought I made
> that clear in my earlier mail.
> 

Yes, I know, I was just hoping for something to please our UI guys I guess. ;)
Sorry for bringing this up again.

Regards,
Simon
Mime
View raw message