From cc818b5486321d771aaa214a27f428c66e6d0438 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Wed, 24 Apr 2013 13:32:19 +0200 Subject: [PATCH] Scripts to commit, optimize or delete on a solr index --- commit_solr.sh | 9 +++++++++ delete_solr.sh | 10 ++++++++++ optimize_solr.sh | 9 +++++++++ 3 files changed, 28 insertions(+) create mode 100644 commit_solr.sh create mode 100755 delete_solr.sh create mode 100755 optimize_solr.sh 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 -- 1.7.10.4