lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: fastest way to get raw hit count
Date Mon, 29 May 2006 17:28:27 GMT
On Monday 29 May 2006 15:54, zzzzz shalev wrote:
> hi all,
>   is there a faster way to retrieve ONLY the count of results for a query?
>   lucene ranks (scores) the first batch of docs and sorts them by rank, this 
is functionality i dont need in certain queries and i assume, not doing this 
can return the count faster then the hits.length()


Scorer scorer =

int docCount = 0;
while ( docCount++;

Paul Elschot

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message