Use Solr 4 config!
[lui-solr.git] / delete_solr.sh
1 #!/bin/bash
2
3 if [ "$1" == "" ] ; then 
4     echo "$0 databaseid [HOST:PORT] "
5     exit 1 ; 
6 fi  
7 HOSTPORT="localhost:8080"
8
9 if [ "$2" != "" ] ; then 
10     HOSTPORT="$2"
11 fi 
12
13 curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary "<delete><query>database:$1</query></delete>"
14 curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false"/>'