Title Story
MediaWiki and Lucene
Lately, I had to enhance a MediaWiki-installation for the search to find some special parameters within a code block. It’s generally known that MediaWiki’s built-in searcher is really just an example of how searching could work, but nothing you’d really like to use on heavy systems. However, Lucene is a pretty good replacement for MediaWiki’s built-in search, unfortunately the current EzMwLucene version isn’t that good integrated into the latest (Debian) Linux version I’ve been using. The installation on the EzMwLucene Extension looks pretty straight-forward, but at least on my installation the lucene/server didn’t really wanted to come up using the scripts that were shipped within its package. After debugging its startup procedure and taking a look into its classes and JARs, I came up with the following command to run the Lucene-server on a Debian GNU/Linux:
export EZMWLUCENE_HOME=/opt/lucene/server
/usr/lib/jvm/java-6-sun-1.6.0.12/jre/bin/java -Dezmwlucene.home=$EZMWLUCENE_HOME -Djava.io.tmpdir=$TMP -cp $EZMWLUCENE_HOME/ezmwlucene.jar:$EZMWLUCENE_HOME/lib/jetty-6.1.14.jar:$EZMWLUCENE_HOME/lib/jetty-util-6.1.14.jar:$EZMWLUCENE_HOME/lib/servlet-api-2.5-6.1.14.jar:$EZMWLUCENE_HOME/lib/commons-codec-1.3.jar:$EZMWLUCENE_HOME/lib/commons-httpclient-3.1.jar:$EZMWLUCENE_HOME/lib/commons-logging.jar:$EZMWLUCENE_HOME/lib/FontBox-0.1.0-dev.jar:$EZMWLUCENE_HOME/lib/lucene-core-2.4.0.jar:$EZMWLUCENE_HOME/lib/lucene-highlighter-2.4.0.jar:$EZMWLUCENE_HOME/lib/PDFBox-0.7.3.jar:$EZMWLUCENE_HOME/lib/poi-3.5-beta3-20080926.jar:$EZMWLUCENE_HOME/lib/poi-scratchpad-3.5-beta3-20080926.jar net.sourceforge.ezmwlucene.service.EzMwLuceneService
Those two lines can be packed-up within a shell-script, which then gets ran by a proper /etc/init.d-script. For me, it now just works perfectly.
Enjoy!