Skip to content

Instantly share code, notes, and snippets.

@mdread
Created July 25, 2012 16:06
Show Gist options
  • Save mdread/3176970 to your computer and use it in GitHub Desktop.
Save mdread/3176970 to your computer and use it in GitHub Desktop.
some useful solr REST commands
#reload core
curl {server-name}/admin/cores -H "Content-Type: text/xml" -d "action=RELOAD" -d "core={core-name}" -G
#empty core
curl {server-name}/{core-name}/update -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
curl {server-name}/{core-name}/update -H "Content-Type: text/xml" --data-binary '<commit />'
curl {server-name}/{core-name}/update -H "Content-Type: text/xml" --data-binary '<optimize />'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment