X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=scripts%2Fdelete_solr.sh;h=6c5140826659f59628c5ecea1c5a7eb1f9fd830f;hb=72e4a4a959bc955caa0f86a421f841544c506334;hp=2b91d6514e1bd80c544efb21f60d3bc3829cc292;hpb=2b52626c1213e6bf757b609316ea027a330da926;p=lui-solr.git
diff --git a/scripts/delete_solr.sh b/scripts/delete_solr.sh
index 2b91d65..6c51408 100755
--- a/scripts/delete_solr.sh
+++ b/scripts/delete_solr.sh
@@ -1,14 +1,20 @@
#!/bin/bash
-if [ "$1" == "" ] ; then
- echo "$0 databaseid [HOST:PORT] "
- exit 1 ;
-fi
-HOSTPORT="localhost:8080"
+HOST_PORT="localhost:8080"
if [ "$2" != "" ] ; then
- HOSTPORT="$2"
+ HOST_PORT="$2"
fi
-curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary "database:$1"
-curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary ''
+SOLR_PATH=solr4
+if [ "$3" != "" ] ; then
+ SOLR_PATH="$3"
+fi
+
+if [ "$1" == "" ] ; then
+ echo "$0 databaseid [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)"
+ exit 1 ;
+fi
+
+curl http://${HOST_PORT}/$SOLR_PATH/update -H "Content-Type: text/xml" --data-binary "database:$1"
+curl http://${HOST_PORT}/$SOLR_PATH/update -H "Content-Type: text/xml" --data-binary ''