> 
> 
> Greetings,
> 
> I would like to add the number of possible hits in my 
> queries, for example,
> "found 18 hits out of a possible 245,000 documents".  I am 
> assuming that
> IndexReader.numDocs() is the best way to get this value.
> 
> However, I would like to use a filter as part of the query.  
> What is the
> most efficient way to get the total number of documents given 
> a filter on a
> query?

can't you use yourFilter.bits(reader).cardinality() to get the number of items 
in the index after the filter?

Regards Ard 

> 
> Thanks,
> J
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to