X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=scripts%2Foptimize_solr.sh;h=83e4219d45b1ef78a7acdb089f84ce588e9db130;hb=ff4c71210eff9588a5d325f20ad030a1d54c1b6d;hp=bb4127d19301a6e26a1260c43dcaf021653e72da;hpb=2b52626c1213e6bf757b609316ea027a330da926;p=lui-solr.git
diff --git a/scripts/optimize_solr.sh b/scripts/optimize_solr.sh
index bb4127d..83e4219 100755
--- a/scripts/optimize_solr.sh
+++ b/scripts/optimize_solr.sh
@@ -1,14 +1,20 @@
#!/bin/bash
-if [ "$1" != "YES" ] ; then
- echo "No confirmation given"
- exit 1 ;
-fi
-
HOST_PORT=localhost:8080
if [ "$2" != "" ] ; then
HOST_PORT="$2"
fi
-curl http://${HOST_PORT}/solr/update -H "Content-Type: text/xml" --data-binary ''
+SOLR_PATH=solr4
+if [ "$3" != "" ] ; then
+ SOLR_PATH="$3"
+fi
+
+if [ "$1" != "YES" ] ; then
+ echo "$0 YES [[HOST:PORT] SOLR_PATH] (default $HOST_PORT/$SOLR_PATH)"
+ exit 1 ;
+fi
+
+
+curl http://${HOST_PORT}/$SOLR_PATH/update -H "Content-Type: text/xml" --data-binary ''