X-Git-Url: http://git.indexdata.com/?p=lui-solr.git;a=blobdiff_plain;f=scripts%2Fcommit_solr.sh;h=df587ab52277bd53230b974cbf17c902f9f75d4f;hp=2b3f6c384bd9e9d4e3fa0de2226b6f7b38909720;hb=2f2e53226405dd2b1b782dab4233360abacbe96c;hpb=2b52626c1213e6bf757b609316ea027a330da926 diff --git a/scripts/commit_solr.sh b/scripts/commit_solr.sh index 2b3f6c3..df587ab 100644 --- a/scripts/commit_solr.sh +++ b/scripts/commit_solr.sh @@ -1,4 +1,17 @@ #!/bin/bash -HOST=localhost -PORT=8080 -curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file +HOST_PORT=localhost:8080 + +if [ "$2" != "" ] ; then + HOST_PORT="$2" +fi + +SOLR_PATH=solr4 +if [ "$2" != "" ] ; then + SOLR_PATH="$2" +fi + +if [ "$1" == "-h" ] ; then + echo "$0 [[HOST:PORT] SOLR_PATH] (default $HOST_PORT/$SOLR_PATH)" +fi + +curl http://$HOST:$PORT/$SOLR_PATH/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file