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
[email protected]
http://observer.wunderwood.org/ (my blog)
> On Sep 19, 2016, at 8:30 AM, John Bickerstaff <[email protected]>
> 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 <[email protected]>
> 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
>>