#!/bin/bash
HOST_PORT="localhost:8080"
if [ "$2" != "" ] ; then
HOST_PORT="$2"
fi
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 "database:$1"
curl http://${HOST_PORT}/$PATH/update -H "Content-Type: text/xml" --data-binary ''