Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lianyi/3eae6b4f8a9b668418d47ae93af3298a to your computer and use it in GitHub Desktop.
Save lianyi/3eae6b4f8a9b668418d47ae93af3298a to your computer and use it in GitHub Desktop.
Delete all documents in a Solr index using curl
# http://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F
# http://wiki.apache.org/solr/UpdateXmlMessages#Updating_a_Data_Record_via_curl
curl http://localhost:8983/solr/update --data '<delete><query>*:*</query></delete>' -H 'Content-type:text/xml; charset=utf-8'
curl http://localhost:8983/solr/update --data '<commit/>' -H 'Content-type:text/xml; charset=utf-8'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment