This page has not been reviewed by our documentation team (more info).

Products > Server > Server development > LuceneServer Setup

How To Install Lucene Server for using Text Search with your MusicBrainz server

By default mb_server/cgi-bin/DBDefs.pm points text search to search.musicbrainz.org, defined in LUCENE_SERVER. This may not be acceptable if you're planning to do intensive querying for large volumes of music files, so you'd like to set up your own Lucene server. This document tells you how. It assumes you have a Musicbrainz server installed and working with data. In particular, I did this on the VirtualMusicBrainzServer.

  • Checkout lucene_index from svn.

  • Checkout lucene_server from svn.

Follow instructions in lucene_index/README.

I installed some packages using apt-get:

apt-get install ant-gcj gcj java-gcj-compat python-ctypes python-dev python-pygresql swig unaccent

Get the other packages from source and install.

Getting PyLucene 1.0.1 installed from source

Edit Makefile by removing comment prefix on lines for your platform. I don't think DB support is necessary, so don't do that.

Debian unstable doesn't have gcj-3.4 at the moment of writing, so I compiled and installed it as described in PyLucene-1.0.1/INSTALL, then used it to compile PyLucene, but I got segmentation faults. You might have better luck, but I got it working with gcj-4.1 instead, so I will tell you how I did that.

I installed swig-1.3.24 from source using the standard ./configure, make, make install. PyLucene says it requires this version. I didn't try with the Debian unstable version, swig-1.3.31.

When using gcj-4.1 in Debian unstable I ran into some problems. This is how I solved them:

  • gcjh not found: ln -s /usr/bin/gcjh-4.1 /usr/bin/gcjh

  • Classes not found when compiling: Symlink classes from subdirectories from release/classes/jar to the matching subdirectory in release/classes. There are better ways to do it (edit makefile for classpaths). Just make sure the classes are found.

  • CPP errors about missing definitions: Not all of the header files were generated properly from java classes by gcjh. This happens if there are errors as described in the step above. Search for nearly empty header files (*.h), delete those files, delete the file listed as makefile target for header generation, that is "release/classes/org/osafoundation/util/PythonException.h", and run make again.

I will update this HowTo as I get more stuff working. My lucene index is building now. Make sure you have enough disk space.

Related How To's

Further Information

  • Add


CategoryHowTo CategoryDevelopment CategoryServer

 
Creative Commons EFF GPL LGPL This material is Open Knowledge Valid XHTML 1.1 Valid CSS 2.0
Original Design|vacubomb.com Contact details Server version: RELEASE-20081123