#!/bin/sh
solrversion=7.2.1
if [ ! -z $1 ];then
solrversion=$1
fi
echo “setup solr-$solrversion”
if [ -d solr-$solrversion ];then
rm -rf solr-$solrversion
fi
wget -O solr-$solrversion.tgz http://archive.apache.org/dist/lucene/solr/$solrversion/solr-$solrversion.tgz
tar zxf solr-$solrversion.tgz
cd solr-$solrversion
bin/solr start -c -force
bin/solr create_collection -c collection1 -force
bin/post example/exampledocs/ -c collection1
echo stopcmd:
echo “bin/solr delete -c collection1”
echo “bin/solr stop -all”