lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <wun...@wunderwood.org>
Subject Re: script to get core num docs
Date Mon, 19 Sep 2016 15:41:16 GMT
Do a search. The URL will looks something like this:

   /solr/core-name/select?q=*:*&rows=0&wt=json

That will return something like this:

   {"responseHeader":{"status":0,"QTime":1},"response":{"numFound":287176,"start":0,"docs":[]}}

Filter that response through this:

   jq .response.numFound

And you’ll get the number of documents in the core.

Alternatively, the info is in the admin status API.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Sep 19, 2016, at 8:30 AM, John Bickerstaff <john@johnbickerstaff.com> wrote:
> 
> I would imagine there's an http call that would get it and you could call
> cURL in your bash script...  I don't know the URL parameters off hand
> however...
> 
> On Mon, Sep 19, 2016 at 9:22 AM, KRIS MUSSHORN <musshorns@comcast.net>
> wrote:
> 
>> How can i get the count of docs from a core with bash?
>> Seems like I have to call Admin/Luke but cant find any specifics.
>> Thanks
>> Kris
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message