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

Reply via email to