"Zhang, Lisheng" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to