Created
November 8, 2013 15:43
-
-
Save krusynth/7372880 to your computer and use it in GitHub Desktop.
Clear solr on localhost. Throw this in your .bash_profile or .bashrc and use `clearsolr *instancename*`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clearsolr() { | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<delete><query>*:*</query></delete>' | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<commit />' | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<optimize />' | |
curl http://localhost:8983/solr/$1/update -H "Content-type: text/xml" --data-binary '<commit />' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment