lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
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
terms.

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.


--
Ian.


On Mon, Mar 14, 2011 at 2:52 PM, Michael Wiegand
<michael.wiegand@lsv.uni-saarland.de> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
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