Skip to content

Instantly share code, notes, and snippets.

@leedavis81
Created October 11, 2012 16:59
Show Gist options
  • Save leedavis81/3873883 to your computer and use it in GitHub Desktop.
Save leedavis81/3873883 to your computer and use it in GitHub Desktop.
Reload a solr core
#!/bin/bash
# reloads a Solr core
if [ "$1" = "" ]; then
echo -n "Name of core to reload: "
read name
else
name=$1
fi
if [ ! -d /var/lib/solr/data/$name ] || [ $name = "" ]; then
echo "Core doesn't exist"
exit
fi
curl "http://127.0.0.1:8080/solr/admin/cores?action=RELOAD&core=$name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment