lucene-java-user mailing list archives

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

"Zhang, Lisheng" <Lisheng.Zhang@broadvision.com> 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.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message