incubator-lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Desilets, Alain" <Alain.Desil...@nrc-cnrc.gc.ca>
Subject RE: [lucy-user] Is there a way to know how many documents are indexed in a Lucy index?
Date Tue, 31 Jan 2012 14:48:53 GMT
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

Mime
View raw message