RE: script to get core num docs
Thanks David.. got it working -Original Message- From: David Santamauro [mailto:david.santama...@gmail.com] Sent: Monday, September 19, 2016 11:55 AM To: solr-user@lucene.apache.org Cc: david.santama...@gmail.com Subject: Re: script to get core num docs https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API wget -O- -q \ '/admin/cores?action=STATUS=coreName=json=true' \ | grep numDocs // /admin/cores?action=STATUS=alexandria_shard2_replica1=json=1'|grep numDocs|cut -f2 -d':'| On 09/19/2016 11:22 AM, KRIS MUSSHORN 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 >
Re: script to get core num docs
https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API wget -O- -q \ '/admin/cores?action=STATUS=coreName=json=true' \ | grep numDocs // /admin/cores?action=STATUS=alexandria_shard2_replica1=json=1'|grep numDocs|cut -f2 -d':'| On 09/19/2016 11:22 AM, KRIS MUSSHORN 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
Re: script to get core num docs
Do a search. The URL will looks something like this: /solr/core-name/select?q=*:*=0=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 wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Sep 19, 2016, at 8:30 AM, John Bickerstaff> 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 > 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 >>
Re: script to get core num docs
If you see it in the Admin UI (and you do), you can get it from the web browser's Developer interface but just reloading the page and watching for traffic. Is that enough for you to discover what you need or do you need more specific help? Regards, Alex. Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 19 September 2016 at 22:22, KRIS MUSSHORNwrote: > 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
Re: script to get core num docs
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 MUSSHORNwrote: > 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 >