jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Total size of a query result and setLimit()
Date Fri, 17 Aug 2007 16:09:05 GMT

> Marcel Reutegger wrote:
> 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().

AFAICS, the real problem is not only choosing which method, but how to return the actual number
of hits? Do you suggest returning the lucene hits.length, or the actual number of nodes/rows
(which might be less then the lucene hits, but very costly to compute) from LazyQueryResultsImpl.getResults
?  

Sorry for interfering with this performance thing, but it is very similar problem to our lucene
impl we build on top of slide some time ago (the index was not ACL aware, so how to know the
actual number of hits which are visible for a user without having to test all nodes), and
I just wanted to add my 2 cents :-) 

Regards Ard

> 
> regards
>   marcel
> 

Mime
View raw message