Re: bash to get doc count

2016-10-05 Thread Shawn Heisey
On 10/5/2016 1:17 PM, KRIS MUSSHORN wrote: > Will someone please tell me why this stores the text "numDocs" instead > of returning the number of docs in the core? #!/bin/bash > DOC_COUNT=`wget -O- -q > $SOLR_HOST'admin/cores?action=STATUS&core='$SOLR_CORE_NAME'&wt=json&indent=true' > | grep numDocs

Re: bash to get doc count

2016-10-05 Thread Comcast
So what would be the right -? Sent from my iPhone > On Oct 5, 2016, at 3:22 PM, Alan Woodward wrote: > > tr -d ‘0-9’ is removing all numbers from the line, which I’m guessing is the > opposite of what you want? > > Alan Woodward > www.flax.co.uk > > >> On 5 Oct 2016, at 20:17, KRIS MUSSHORN

Re: bash to get doc count

2016-10-05 Thread Walter Underwood
If you have the jq command, that will be cleaner than using tr. Also, you can get the number of documents with a query for *:* instead of using the admin API. This same question was asked on Sep. 19th. This was my answer then. Do a search. The URL will looks something like this: /solr/c

Re: bash to get doc count

2016-10-05 Thread Alan Woodward
tr -d ‘0-9’ is removing all numbers from the line, which I’m guessing is the opposite of what you want? Alan Woodward www.flax.co.uk > On 5 Oct 2016, at 20:17, KRIS MUSSHORN wrote: > > Will someone please tell me why this stores the text "numDocs" instead of > returning the number of docs in

Re: bash to get doc count

2016-10-05 Thread KRIS MUSSHORN
ps $SOLR_HOST and $SOLR_CORE_NAME are set correctly. Kris - Original Message - From: "KRIS MUSSHORN" To: solr-user@lucene.apache.org Sent: Wednesday, October 5, 2016 3:17:19 PM Subject: bash to get doc count Will someone please tell me why this stores the tex

bash to get doc count

2016-10-05 Thread KRIS MUSSHORN
Will someone please tell me why this stores the text "numDocs" instead of returning the number of docs in the core? #!/bin/bash DOC_COUNT=`wget -O- -q $SOLR_HOST'admin/cores?action=STATUS&core='$SOLR_CORE_NAME'&wt=json&indent=true' | grep numDocs | tr -d '0-9'` TIA Kris