Created
March 30, 2015 14:30
-
-
Save peterkraume/f31780e2271b0c8e5a3e to your computer and use it in GitHub Desktop.
delete documents from multiple Solr cores
This file contains 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
#!/bin/bash | |
query="indexed:[2000-01-01T00:00:00Z TO 2015-03-20T00:00:00Z] AND type:tx_solr_file" | |
host="http://localhost:8080/solr/" | |
cores=" | |
core_de \ | |
core_en \ | |
core_fr" | |
for core in $cores; do | |
echo "##### Deleting from core $core #####" | |
curl $host$core"/update?commit=true" -H "Content-Type: text/xml" --data-binary "<delete><query>$query</query></delete>" | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment