Fix PATH overriding
[lui-solr.git] / scripts / commit_solr.sh
1 #!/bin/bash
2 HOST_PORT=localhost:8080
3
4 if [ "$2" != "" ] ; then 
5     HOST_PORT="$2"
6 fi
7
8 SOLR_PATH=solr4
9 if [ "$2" != "" ] ; then 
10     SOLR_PATH="$2"
11 fi
12
13 if [ "$1" == "-h" ] ; then 
14     echo "$0 [[HOST:PORT] SOLR_PATH] (default $HOST_PORT/$SOLR_PATH)"
15 fi
16
17 curl http://$HOST:$PORT/$SOLR_PATH/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false" expungeDeletes="true"/>'