X-Git-Url: http://git.indexdata.com/?p=lui-solr.git;a=blobdiff_plain;f=scripts%2Fdelete_solr.sh;h=6c5140826659f59628c5ecea1c5a7eb1f9fd830f;hp=2b91d6514e1bd80c544efb21f60d3bc3829cc292;hb=2f2e53226405dd2b1b782dab4233360abacbe96c;hpb=2b52626c1213e6bf757b609316ea027a330da926 diff --git a/scripts/delete_solr.sh b/scripts/delete_solr.sh index 2b91d65..6c51408 100755 --- a/scripts/delete_solr.sh +++ b/scripts/delete_solr.sh @@ -1,14 +1,20 @@ #!/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 "database:$1" -curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary '' +SOLR_PATH=solr4 +if [ "$3" != "" ] ; then + SOLR_PATH="$3" +fi + +if [ "$1" == "" ] ; then + echo "$0 databaseid [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)" + exit 1 ; +fi + +curl http://${HOST_PORT}/$SOLR_PATH/update -H "Content-Type: text/xml" --data-binary "database:$1" +curl http://${HOST_PORT}/$SOLR_PATH/update -H "Content-Type: text/xml" --data-binary ''