Skip to content

Instantly share code, notes, and snippets.

@devasat
Created May 22, 2017 05:13
Show Gist options
  • Save devasat/fbeb6e6a9aabee081ca50170364bad2b to your computer and use it in GitHub Desktop.
Save devasat/fbeb6e6a9aabee081ca50170364bad2b to your computer and use it in GitHub Desktop.
Apache Solr - query the number of documents in different collections
for i in collname1 collname2 collname3; do
curl -s "http://server/solr/${i}/select?q=*:*" 2>&1 | grep -o "numF.*" | cut -d' ' -f1 | cut -d\" -f2 | (read count; printf "%-20s %15s\n" $i $count;);
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment