Skip to content

Instantly share code, notes, and snippets.

@milanchheda
Created October 25, 2016 12:03
Show Gist options
  • Save milanchheda/ee0d37e3664f0899a32e296f0e25241c to your computer and use it in GitHub Desktop.
Save milanchheda/ee0d37e3664f0899a32e296f0e25241c to your computer and use it in GitHub Desktop.
Bash script to delete data from Apache SOLR
#!/bin/sh
curl http://localhost:8080/solr/update/?commit=true -H 'Content-Type: text/xml' --data-binary '<update><delete><query>type:[content_type_name]</query></delete></update>'
single core:
curl http://localhost:8080/solr/update?commit=true -H "Content-Type: text/xml" --data-binary ':'
multiple core:
curl http://localhost:8080/solr/[CORE_NAME]/update?commit=true -H "Content-Type: text/xml" --data-binary ':'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment