Scripts to commit, optimize or delete on a solr index
[lui-solr.git] / commit_solr.sh
diff --git a/commit_solr.sh b/commit_solr.sh
new file mode 100644 (file)
index 0000000..0cb3a43
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ "$1" == "" ] ; then 
+    echo "No database id given"
+    exit 1 ; 
+fi  
+HOST=localhost
+PORT=8080
+curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false"/>'
\ No newline at end of file