Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/lui-solr
authorDennis Schafroth <dennis@indexdata.com>
Mon, 19 Aug 2013 10:47:14 +0000 (12:47 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Mon, 19 Aug 2013 10:47:14 +0000 (12:47 +0200)
commit_solr.sh [deleted file]
debian/rules
delete_solr.sh [deleted file]
optimize_solr.sh [deleted file]
scripts/commit_solr.sh [new file with mode: 0644]
scripts/delete_solr.sh [new file with mode: 0755]
scripts/optimize_solr.sh [new file with mode: 0755]

diff --git a/commit_solr.sh b/commit_solr.sh
deleted file mode 100644 (file)
index 0cb3a43..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/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 '<commit waitFlush="false" waitSearcher="false"/>'
\ No newline at end of file
index c637b09..140f88c 100755 (executable)
@@ -63,7 +63,8 @@ install-stamp: build
 
        # lui-solr-common. Install a Solr WAR.
        mkdir -p $(LUI_SOLR_COMMON_DIR)
-       cp dist/apache-solr-$(SOLR_VERSION).war -d $(LUI_SOLR_COMMON_DIR)
+       cp dist/apache-solr-$(SOLR_VERSION).war $(LUI_SOLR_COMMON_DIR)
+       cp -rp scripts $(LUI_SOLR_COMMON_DIR)
 
        # lui-solr-master
        mkdir -p    $(LUI_SOLR_MASTER_SHARE_DIR)
diff --git a/delete_solr.sh b/delete_solr.sh
deleted file mode 100755 (executable)
index 2b91d65..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-if [ "$1" == "" ] ; then 
-    echo "$0 databaseid [HOST:PORT] "
-    exit 1 ; 
-fi  
-HOSTPORT="localhost:8080"
-
-if [ "$2" != "" ] ; then 
-    HOSTPORT="$2"
-fi 
-
-curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary "<delete><query>database:$1</query></delete>"
-curl http://${HOSTPORT}/solr/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false"/>'
diff --git a/optimize_solr.sh b/optimize_solr.sh
deleted file mode 100755 (executable)
index 1c22ed8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-if [ "$1" != "YES" ] ; then 
-    echo "No confirmation given"
-    exit 1 ; 
-fi  
-
-HOST_PORT=localhost:8080
-
-if [ "$2" != "" ] ; then 
-    HOST_PORT="$2"
-fi
-
-curl http://${HOST_PORT}/solr/update -H "Content-Type: text/xml" --data-binary '<optimize waitSearcher="false" />'
\ No newline at end of file
diff --git a/scripts/commit_solr.sh b/scripts/commit_solr.sh
new file mode 100644 (file)
index 0000000..6e3dff2
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+HOST_PORT=localhost:8080
+
+if [ "$2" != "" ] ; then 
+    HOST_PORT="$2"
+fi
+
+PATH=solr4
+if [ "$2" != "" ] ; then 
+    PATH="$2"
+fi
+
+if [ "$1" == "-h" ] ; then 
+    echo "$0 [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)"
+fi
+
+curl http://$HOST:$PORT/$PATH/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false" expungeDeletes="true"/>'
\ No newline at end of file
diff --git a/scripts/delete_solr.sh b/scripts/delete_solr.sh
new file mode 100755 (executable)
index 0000000..c5f9f85
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+HOST_PORT="localhost:8080"
+
+if [ "$2" != "" ] ; then 
+    HOST_PORT="$2"
+fi 
+
+PATH=solr4
+if [ "$3" != "" ] ; then 
+    PATH="$3"
+fi
+
+if [ "$1" == "" ] ; then 
+    echo "$0 databaseid [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)"
+    exit 1 ; 
+fi  
+
+curl http://${HOST_PORT}/$PATH/update -H "Content-Type: text/xml" --data-binary "<delete><query>database:$1</query></delete>"
+curl http://${HOST_PORT}/$PATH/update -H "Content-Type: text/xml" --data-binary '<commit waitFlush="false" waitSearcher="false"/>'
diff --git a/scripts/optimize_solr.sh b/scripts/optimize_solr.sh
new file mode 100755 (executable)
index 0000000..d608b4a
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+HOST_PORT=localhost:8080
+
+if [ "$2" != "" ] ; then 
+    HOST_PORT="$2"
+fi
+
+PATH=solr4
+if [ "$3" != "" ] ; then 
+    PATH="$3"
+fi
+
+if [ "$1" != "YES" ] ; then 
+    echo "$0 YES [[HOST:PORT] PATH] (default $HOST_PORT/$PATH)"
+    exit 1 ; 
+fi  
+
+
+curl http://${HOST_PORT}/$PATH/update -H "Content-Type: text/xml" --data-binary '<optimize waitSearcher="false" expungeDeletes="true" />'