You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucy.apache.org by "Desilets, Alain" <Al...@nrc-cnrc.gc.ca> on 2012/01/30 22:34:51 UTC
[lucy-user] Is there a way to know how many documents are indexed in a Lucy
index?
I would like to know how many documents are stored in an index. Is there a way to do that?
I tried searching for the empty string and getting the total_hits() value, but a search for the empty string always returns an empty list of hits.
RE: [lucy-user] Is there a way to know how many documents are
indexed in a Lucy index?
Posted by "Desilets, Alain" <Al...@nrc-cnrc.gc.ca>.
Thx. That did the trick.
-----Original Message-----
From: Peter Karman [mailto:peter@peknet.com]
Sent: Monday, January 30, 2012 9:40 PM
To: lucy-user@incubator.apache.org
Subject: Re: [lucy-user] Is there a way to know how many documents are indexed in a Lucy index?
Desilets, Alain wrote on 1/30/12 3:34 PM:
> I would like to know how many documents are stored in an index. Is there a way to do that?
>
> I tried searching for the empty string and getting the total_hits() value, but a search for the empty string always returns an empty list of hits.
try doc_count()
http://search.cpan.org/dist/Lucy/lib/Lucy/Index/IndexReader.pod#doc_count%28%29
--
Peter Karman . http://peknet.com/ . peter@peknet.com
Re: [lucy-user] Is there a way to know how many documents are indexed
in a Lucy index?
Posted by Peter Karman <pe...@peknet.com>.
Desilets, Alain wrote on 1/30/12 3:34 PM:
> I would like to know how many documents are stored in an index. Is there a way to do that?
>
> I tried searching for the empty string and getting the total_hits() value, but a search for the empty string always returns an empty list of hits.
try doc_count()
http://search.cpan.org/dist/Lucy/lib/Lucy/Index/IndexReader.pod#doc_count%28%29
--
Peter Karman . http://peknet.com/ . peter@peknet.com