You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by liat oren <or...@gmail.com> on 2010/09/13 11:46:22 UTC

Get total number of results

Hi,

I need to give the user the total number of results when running a query.

Currently I use the TopDocCollector to get the top 200 documents.

How can I know the total number of results?

Thanks a lot,
Liat

Re: Get total number of results

Posted by Ian Lea <ia...@gmail.com>.
http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/search/TopDocsCollector.html#getTotalHits%28%29


--
Ian.


On Mon, Sep 13, 2010 at 10:46 AM, liat oren <or...@gmail.com> wrote:
> Hi,
>
> I need to give the user the total number of results when running a query.
>
> Currently I use the TopDocCollector to get the top 200 documents.
>
> How can I know the total number of results?
>
> Thanks a lot,
> Liat
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org