X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=scripts%2Fcommit_solr.sh;h=6e3dff280a23b673aff6fc3c1c8f1de2e541cc4c;hb=d72e0c0f53b8e62bc0dcb6569ede7e2170b56b59;hp=2b3f6c384bd9e9d4e3fa0de2226b6f7b38909720;hpb=2b52626c1213e6bf757b609316ea027a330da926;p=lui-solr.git
diff --git a/scripts/commit_solr.sh b/scripts/commit_solr.sh
index 2b3f6c3..6e3dff2 100644
--- a/scripts/commit_solr.sh
+++ b/scripts/commit_solr.sh
@@ -1,4 +1,17 @@
#!/bin/bash
-HOST=localhost
-PORT=8080
-curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary ''
\ No newline at end of file
+HOST_PORT=localhost:8080
+
+if [ "$2" != "" ] ; then
+ HOST_PORT="$2"
+fi
+
+PATH=solr4
+if [ "$2" != "" ] ; then
+ PATH="$2"
+fi
+
+if [ "$1" == "-h" ] ; then
+ echo "$0 [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)"
+fi
+
+curl http://$HOST:$PORT/$PATH/update -H "Content-Type: text/xml" --data-binary ''
\ No newline at end of file