lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <>
Subject RE: How to avoid score calculation completely?
Date Thu, 24 May 2007 16:40:58 GMT

"Zhang, Lisheng" <> wrote:
> Hi, Thanks for helps!
> Yes, along the line you mentioned we can reduce the amount
> of calculation, but we still need to loop through to count
> all docs, so time may still be O(n), I am wondering if we
> can avoid the loop to get count directly?

I don't think you can get less than O(n) unless the query
is a single term.  If it is a single term you can just call
IndexReader.docFreq(...) to get the number of docs that
have that term, but, this call will not take into account
deleted documents.


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

View raw message