Merge tag 'v0.4.11'
[lui-solr.git] / scripts / commit_solr.sh
index 2b3f6c3..6e3dff2 100644 (file)
@@ -1,4 +1,17 @@
 #!/bin/bash
-HOST=localhost
-PORT=8080
-curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false" expungeDeletes="true"/>'
\ 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 '<commit waitFlush="false" waitSearcher="false" expungeDeletes="true"/>'
\ No newline at end of file