FAQ
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

Search Discussions

  • Ian Lea at Mar 15, 2011 at 10:25 am
    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
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedMar 14, '11 at 2:52p
activeMar 15, '11 at 10:25a
posts2
users2
websitelucene.apache.org

2 users in discussion

Ian Lea: 1 post Michael Wiegand: 1 post

People

Translate

site design / logo © 2021 Grokbase