lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <>
Subject Re: no. of documents with hits vs. no. of hits
Date Tue, 15 Mar 2011 10:24:16 GMT
Lucene counts the number of matched docs.  A particular document will
count as 1 whether it is matched by 1 search term or many search

I don't believe it is possible to count what you are asking for using
standard calls.  It might be possible with a custom collector that
somehow had access to the values passed to the coord() method of the
Similarity in use for a search.  Sounds hairy, maybe impossible.


On Mon, Mar 14, 2011 at 2:52 PM, Michael Wiegand
<> wrote:
> Hi,
> Does Lucene always count the number of documents with hits matching a query
> or is it also possible to count the overall number of hits?
> There would be a difference between the two if within a document there is
> actually more than one hit.
> Thank you in advance!
> Best,
> Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message