--- /dev/null
+#!/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
--- /dev/null
+#!/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 "<delete><query>database:$1</query></delete>"
+curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false"/>'
\ No newline at end of file
--- /dev/null
+#!/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