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