Description: Local Unified Index Solr Tomcat 6 integration for a LUI master
The LUI is part of the MasterKey suite. This package provides Tomcat 6 integration.
+Package: masterkey-lui-solr4-zookeeper
+Architecture: all
+Depends: masterkey-lui-solr4-common
+Description: Local Unified Index (Solr)
+ A stand-alone (jetty) ZooKeeper enabled Solr 4. Require 2 or more configurations running on multiple machines
+
--- /dev/null
+#!/bin/sh
+ln -sf /etc/masterkey/lui/lui-solr-master.xml /etc/tomcat6/Catalina/localhost/solr.xml
+chown -R tomcat6:tomcat6 /var/lib/masterkey/lui/solr/master
--- /dev/null
+#!/bin/sh -e
+
+case "$1" in
+ remove)
+ ;;
+ purge)
+ rm -rf /var/lib/masterkey/masterkey-lui-solr4/zookeeper
+ ;;
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+esac
+
+#DEBHELPER#
+
+exit 0
CONF_MASTER = $(SHARE)/master/collection1/
CONF_SLAVE = $(SHARE)/slave/collection1/
+CONF_ZK = $(SHARE)/zookeeper/
DATA = /var/lib/masterkey/lui/solr4
DATA_MASTER = $(DATA)/master
DATA_SLAVE = $(DATA)/slave
+DATA_ZK = $(DATA)/zk-first
LUI_SOLR_COMMON = $(BASE)-common
LUI_SOLR_COMMON_ROOT = $(CURDIR)/debian/$(LUI_SOLR_COMMON)
CATALINA_HOME=/usr/share/tomcat6
SOLR_VERSION=4.4.0
+LUI_SOLR_ZK = $(BASE)-zookeeper
+LUI_SOLR_ZK_ROOT = $(CURDIR)/debian/$(LUI_SOLR_ZK)
+LUI_SOLR_ZK_SHARE_DIR = $(LUI_SOLR_ZK_ROOT)$(CONF_ZK)
+LUI_SOLR_ZK_LIB_DIR = $(LUI_SOLR_ZK_ROOT)$(DATA_ZK)
+
+
PACKAGE=$(shell dh_listpackages)
build:
mkdir -p $(LUI_SOLR_SLAVE_ROOT)/etc/masterkey/lui
cp etc/solr4-tomcat-context-slave.xml $(LUI_SOLR_SLAVE_ROOT)/etc/masterkey/lui/lui-solr4-slave.xml
+ # lui-solr-zookeeper
+ mkdir -p $(LUI_SOLR_ZK_SHARE_DIR)
+ cp -rp zookeeper $(LUI_SOLR_ZK_SHARE_DIR)
+ mkdir -p $(LUI_SOLR_ZK_LIB_DIR)
+
+
touch $@
binary: build install
--- /dev/null
+#!/bin/bash
+
+INSTALL_PATH=`pwd`
+CONFIG=$1
+mkdir -p ${CONFIG}
+ln -s ${INSTALL_PATH}/etc ${CONFIG}/
+ln -s ${INSTALL_PATH}/contexts ${CONFIG}/
+ln -s ${INSTALL_PATH}/lib ${CONFIG}/
+ln -s ${INSTALL_PATH}/webapps ${CONFIG}/
+ln -s ${INSTALL_PATH}/resources ${CONFIG}/
+ln -s ${INSTALL_PATH}/start.jar ${CONFIG}/
+ln -s ${INSTALL_PATH}/zookeeper.sh ${CONFIG}/
+cp -rp ${INSTALL_PATH}/solr ${CONFIG}/
+mkdir -p ${CONFIG}/logs
\ No newline at end of file
#/bin/bash
-OPTIONS="-Djetty.port=8983 -DzkHost=opencontent-solr.index:9983"
-NAME="indexdata-solr-zookeeper"
+NAME="indexdata-lui-solr-zookeeper"
+HOST=localhost
+PORT=8983
+SHARDS=2
PID_FILE=/var/run/${NAME}.pid
LOG_FILE=/var/log/${NAME}.log
-if [ -f "options" ]; then
- source options
+ZOOKEEPER=yes
+OPTIONS=${OPTIONS:-options}
+
+if [ -f "$OPTIONS" ]; then
+ source $OPTIONS
else
- echo "No options file. Using defaults: $OPTIONS"
+ echo "No options file ($OPTIONS). Using defaults."
+fi
+let ZKPORT=$PORT+1000
+if [ "$ZKHOSTS" == "" ] ; then
+ ZKHOSTS=${HOST}:${ZKPORT}
+fi
+
+if [ "$BOOTSTRAP_CONF" != "" ] ; then
+ BOOTSTRAP_OPT="-Dbootstrap_confdir=$BOOTSTRAP_CONF"
+fi
+if [ "$PORT" == "" ] ; then
+ echo Port missing
+
+fi
+if [ "$ZKHOSTS" == "" ] ; then
+ echo ZKHOSTS missing
+fi
+if [ "$SHARDS" == "" ] ; then
+ echo SHARDS missing
+fi
+if [ "$ZOOKEEPER" == "yes" ] ; then
+ ZKRUN="-DzkRun -DnumShards=${SHARDS}"
+fi
+if [ "${SOLR_HOME}" != "" ] ; then
+ SOLR_HOME_OPT="-Dsolr.solr.home=${SOLR_HOME}"
fi
+OPTIONS=" $SOLR_HOME_OPT -Djetty.port=$PORT ${BOOTSTRAP_OPT} -Dcollection.configName=$NAME ${ZKRUN} -DzkHost=${ZKHOSTS} "
if [ "$1" == "start" ]; then
if [ -f "${PID_FILE}" ] ; then
echo "pid file ${PID_FILE} exists. Already running?"
java $OPTIONS -jar start.jar > $LOG_FILE &
echo $! > ${PID_FILE}
elif [ "$1" == "stop" ]; then
- if [ -x "${PID_FILE}" ] ; then
- kill `echo ${PID_FILE}`
+ if [ -f "${PID_FILE}" ] ; then
+ kill `cat ${PID_FILE}`
rm ${PID_FILE}
+ else
+ echo "No pid file ($PID_FILE) found"
fi
else
echo "$0 [start|stop|status]"
--- /dev/null
+*.log
+*.pid
+logs/
+solr/zoo_data
+solr-webapp/
\ No newline at end of file
-OPTIONS=" -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf -DzkRun -DzkHost=opencontent-solr.index:9983 -DnumShards=2 "
\ No newline at end of file
+NAME="zk-lui-solr"
+HOST=localhost
+PID_FILE="./${NAME}.pid"
+LOG_FILE="./${NAME}.log"
+PORT=8983
+#ZKHOSTS=opencontent-solr.index:9983
+ZKRUN=yes
+BOOTSTRAP_CONF=./solr/collection1/conf
--- /dev/null
+NAME="zk-lui-solr"
+HOST=localhost
+PID_FILE="./${NAME}.pid"
+LOG_FILE="./${NAME}.log"
+PORT=8983
+ZKRUN=yes
+BOOTSTRAP_CONF=./solr/collection1/conf
--- /dev/null
+NAME="zk-lui-solr-second"
+HOST=localhost
+PID_FILE="./${NAME}.pid"
+LOG_FILE="./${NAME}.log"
+PORT=8984
+ZKHOSTS=localhost:9983
+#BOOTSTRAP_CONF=./solr/collection1/conf
+ZOOKEEPER=no
<field name="transactionId" type="long" indexed="true" stored="false"/>
- <field name="author" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
- <field name="author_exact" type="string" indexed="true" stored="false" multiValued="true" omitNorms="true" docValues="true" />
+ <field name="author" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
+ <field name="author_exact" type="string" indexed="true" stored="false" multiValued="true" omitNorms="true" docValues="true" />
<field name="author-date" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
<field name="author-title" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
<field name="lccn" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
<field name="medium" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
- <field name="medium_exact" type="facet" indexed="true" stored="false" multiValued="true" omitNorms="true"/>
+ <field name="medium_exact" type="facet" indexed="true" stored="false" multiValued="true" omitNorms="true" />
<field name="meeting-date" type="text" indexed="true" stored="true" omitNorms="true"/>
<field name="meeting-location" type="text" indexed="true" stored="true" omitNorms="true"/>
<field name="series-title" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
<field name="subject" type="text_ws" indexed="true" stored="true" multiValued="true" omitNorms="true" />
- <field name="subject_exact" type="facet" indexed="true" stored="false" multiValued="true" omitNorms="true" />
+ <field name="subject_exact" type="string" indexed="true" stored="false" multiValued="true" omitNorms="true" docValues="true" />
<field name="subject-long" type="text_ws" indexed="true" stored="true" multiValued="true" omitNorms="true" />
<field name="system-control-nr" type="text" indexed="true" stored="true" multiValued="true" omitNorms="true"/>
destination field is to use the dynamic field syntax.
copyField also supports a maxChars to copy setting. -->
- <copyField source="*" dest="text" maxChars="10000"/>
+ <copyField source="*" dest="text"/>
<!-- copy name to alphaNameSort, a field designed for sorting by name -->
<!-- <copyField source="name" dest="alphaNameSort"/> -->
The examples below can be used to load some solr-contribs along
with their external dependencies.
-->
+<!--
<lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
-
+-->
<!-- an exact 'path' can be used instead of a 'dir' to specify a
specific jar file. This will cause a serious error to be logged
if it can't be loaded.
-->
<listener event="newSearcher" class="solr.QuerySenderListener">
<arr name="queries">
- <!--
- <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
- <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
- -->
+ <lst>
+ <str name="q">database:*</str>
+ <str name="facet">true</str>
+ <str name="facet.mincount">1</str>
+ <str name="facet.field">author_exact</str>
+ <str name="facet.field">subject_exact</str>
+ <str name="facet.field">medium_exact</str>
+ <str name="facet.field">date</str>
+ <str name="facet.field">database</str>
+ </lst>
</arr>
</listener>
<listener event="firstSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<lst>
- <str name="q">static firstSearcher warming in solrconfig.xml</str>
+ <str name="q">database:*</str>
+ <str name="facet">true</str>
+ <str name="facet.mincount">1</str>
+ <str name="facet.field">author_exact</str>
+ <str name="facet.field">subject_exact</str>
+ <str name="facet.field">medium_exact</str>
+ <str name="facet.field">date</str>
+ <str name="facet.field">database</str>
</lst>
</arr>
</listener>
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="df">text</str>
+ <str name="fl">*,score</str>
</lst>
<!-- In addition to defaults, "appends" params can be specified
to identify values which should be appended to the list of
+++ /dev/null
-../dist/solr-4.4.0.war
\ No newline at end of file
--- /dev/null
+../../dist/solr-4.4.0.war
\ No newline at end of file