On Fri, Apr 23, 2010 at 15:47, Simon Gaeremynck <[email protected]> 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.

> 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.

> 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.

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to