#!/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
#!/bin/bash
-if [ "$1" == "" ] ; then
- echo "$0 databaseid [HOST:PORT] "
- exit 1 ;
-fi
-HOSTPORT="localhost:8080"
+HOST_PORT="localhost:8080"
if [ "$2" != "" ] ; then
- HOSTPORT="$2"
+ HOST_PORT="$2"
fi
-curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary "<delete><query>database:$1</query></delete>"
-curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false"/>'
+PATH=solr4
+if [ "$3" != "" ] ; then
+ PATH="$3"
+fi
+
+if [ "$1" == "" ] ; then
+ echo "$0 databaseid [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)"
+ exit 1 ;
+fi
+
+curl http://${HOST_PORT}/$PATH/update -H "Content-Type: text/xml" --data-binary "<delete><query>database:$1</query></delete>"
+curl http://${HOST_PORT}/$PATH/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false"/>'
#!/bin/bash
-if [ "$1" != "YES" ] ; then
- echo "No confirmation given"
- exit 1 ;
-fi
-
HOST_PORT=localhost:8080
if [ "$2" != "" ] ; then
HOST_PORT="$2"
fi
-curl http://${HOST_PORT}/solr/update -H "Content-Type: text/xml" --data-binary '<optimize waitSearcher="false" expungeDeletes="true" />'
+PATH=solr4
+if [ "$3" != "" ] ; then
+ PATH="$3"
+fi
+
+if [ "$1" != "YES" ] ; then
+ echo "$0 YES [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)"
+ exit 1 ;
+fi
+
+
+curl http://${HOST_PORT}/$PATH/update -H "Content-Type: text/xml" --data-binary '<optimize waitSearcher="false" expungeDeletes="true" />'