From: Dennis Schafroth Date: Wed, 24 Apr 2013 11:32:19 +0000 (+0200) Subject: Scripts to commit, optimize or delete on a solr index X-Git-Tag: v0.4.1~10 X-Git-Url: http://git.indexdata.com/?p=lui-solr.git;a=commitdiff_plain;h=cc818b5486321d771aaa214a27f428c66e6d0438;hp=e79b12624edd4b82c95aa64a8342778b22ce6c99 Scripts to commit, optimize or delete on a solr index --- diff --git a/commit_solr.sh b/commit_solr.sh new file mode 100644 index 0000000..0cb3a43 --- /dev/null +++ b/commit_solr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$1" == "" ] ; then + echo "No database id given" + exit 1 ; +fi +HOST=localhost +PORT=8080 +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file diff --git a/delete_solr.sh b/delete_solr.sh new file mode 100755 index 0000000..8a586ae --- /dev/null +++ b/delete_solr.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ "$1" == "" ] ; then + echo "No database id given" + exit 1 ; +fi +HOST=localhost +PORT=8080 +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary "database:$1" +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file diff --git a/optimize_solr.sh b/optimize_solr.sh new file mode 100755 index 0000000..90d9a26 --- /dev/null +++ b/optimize_solr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$1" != "YES" ] ; then + echo "No confirmation given" + exit 1 ; +fi +HOST=localhost +PORT=8080 +curl http://$HOST:$PORT/solr/update -H "Content-Type: text/xml" --data-binary '' \ No newline at end of file