jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Total size of a query result and setLimit()
Date Fri, 17 Aug 2007 15:44:48 GMT
Thomas Mueller wrote:
>> as a replacement for setLimit()
> 
> I wouldn't remove setLimit(). Maybe Lucene does not have this option,
> I don't know about that. But in the database world, it speeds up
> queries. Sometimes the database can use a faster access method. When
> ordering is used, Jackrabbit could simply ignore results that are (so
> far) outside the limit, saving memory and speed up sorting.

I'm not concerned about an implementation not being able to 'support' 
setLimit(). I rather think of applications using that new method and at the same 
time wish to find out the total number of matches, as written initially by 
Christoph.

Hmm, after some thinking here's another proposal:

keep the setLimit() as is. but introduce a getSize() (or getTotalMatches()?) on 
the QueryResult. This method always returns the total number of nodes/rows 
independent of setLimit().

regards
  marcel

Mime
View raw message