lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John DeRosa <>
Subject Re: Programmatically retrieving numDocs (or any other statistic)
Date Fri, 30 Jul 2010 21:32:33 GMT

On Jul 30, 2010, at 1:11 PM, Peter Karich wrote:

> Both approaches are ok, I think. (although I don't know the python API)
> BTW: If you query q=*:* then add rows=0 to avoid some traffic.
> Regards,
> Peter.
>> I want to programmatically retrieve the number of indexed documents. I.e., get the
value of numDocs.
>> The only two ways I've come up with are searching for "*:*" and reporting the hit
count, or sending an Http GET to and
searching for <stat name="numDocs" >xxxx </stat> in the response.
>> Both seem to be overkill. Is there an easier way to ask SolrIndexSearcher, "what's
>> (I'm doing this in Python, using Pysolr, if that matters.)
>> Thanks!

View raw message