FAQ
Hi,

I am currently mainly interested in the overall number of matches in a
document collection (several GBs) given a particular query.
At the moment I am not interested in the matching documents themselves;
just the number would be sufficient.
In previous versions of lucene the Searcher class had a method
"search(Query query)" but this method is now deprecated.
The alternative methods of "search()" (that are not deprecated) require
the user to specify the number of topN documents and a filter.
Is there no counterpart for the old plain "search(Query query)"?


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 11, 2011 at 2:54 pm
    There are search methods that don't require a filter, but you are
    right that there is nothing quite as simple as search(q).
    TopDocs tp = ms.search(lucquery, 1);
    And then the total count is in tp.totalHits


    --
    Ian.


    On Fri, Mar 11, 2011 at 1:41 PM, Michael Wiegand
    wrote:
    Hi,

    I am currently mainly interested in the overall number of matches in a
    document collection (several GBs) given a particular query.
    At the moment I am not interested in the matching documents themselves; just
    the number would be sufficient.
    In previous versions of lucene the Searcher class had a method "search(Query
    query)" but this method is now deprecated.
    The alternative methods of "search()" (that are not deprecated) require the
    user to specify the number of topN documents and a filter.
    Is there no counterpart for the old plain "search(Query query)"?


    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 11, '11 at 1:42p
activeMar 11, '11 at 2:54p
posts2
users2
websitelucene.apache.org

2 users in discussion

Ian Lea: 1 post Michael Wiegand: 1 post

People

Translate

site design / logo © 2021 Grokbase