Binary distributions are available at SourceForge.net and provides a very straightforward
installation.
11g/12c Binary Distributions
Edit your ~/build.properties file with your Database values (Windows users can find
build.properties file at C:\Documents and Settings\username folder):
db.str=test
db.usr=LUCENE
db.pwd=LUCENE
dba.usr=sys
dba.pwd=change_on_install
javac.debug=true
javac.source=1.4
javac.target=1.4
db.str is your SQLNet connect string for your target database, check first with tnsping
This is an example environment setting before installing on 11g database
MAVEN_HOME=/usr/local/maven
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0.6.0/db_1
ORACLE_SID=test
JAVA_HOME=$ORACLE_HOME/jdk
PATH=$MAVEN_HOME/bin:$HOME/bin:$ORACLE_HOME/bin:$JAVA_HOME/bin:/usr/local/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/local/lib
CVS_RSH=ssh
umask 022
export PATH LD_LIBRARY_PATH ORACLE_HOME ORACLE_BASE ORACLE_SID JAVA_HOME CVS_RSH NLS_LANG
Upload, install and test your code into the database
ant install-ojvm
ant test-domain-index
For Oracle 11g/12c you can perform a post-installation step:
ant jit-lucene-classes
This target force to translate all Lucene, Snowball and LDI classes to assembler.
Instead of waiting that the database compile it by detecting most used classes or method.
First edit your ~/build.properties with something like this:
db.str=orcl
db.usr=LUCENE
db.pwd=LUCENE
dba.usr=sys
dba.pwd=change_on_install
javac.debug=true
javac.source=1.4
javac.target=1.4
db.str property is a SQLNet connect string for the target database.
ORACLE_HOME environment setting is required and properly configured to an Oracle 10g database layout, finally execute ant without arguments.
Here an example of environment setting on 10g database:
MAVEN_HOME=/usr/local/maven
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=orcl
JAVA_HOME=$ORACLE_HOME/jdk
PATH=$MAVEN_HOME/bin:$HOME/bin:$ORACLE_HOME/bin:$JAVA_HOME/bin:/usr/local/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/local/lib
CVS_RSH=ssh
umask 022
export PATH LD_LIBRARY_PATH ORACLE_HOME ORACLE_BASE ORACLE_SID JAVA_HOME CVS_RSH NLS_LANG
If you are re-installing Oracle Lucene OJVM integration first drop any Lucene Domain Index not installed at Lucene's schema.
Default target will drop first Lucene schema if exists, additionaly (Recommended for production system) you can run "ant ncomp-ojvm" which translates all Lucene classes to C using JAccelerator, for example:
ant ncomp-ojvm
ant test-domain-index
cd /tmp
svn checkout svn://svn.code.sf.net/p/ldi/code/odi/trunk odi
cd $LUCENE_ROOT/contrib
cp -rp /tmp/odi .
<target name="jar-test" depends="compile-test">
<sequential>
<mkdir dir="${build.dir}" />
<jarify basedir="${tests.src.dir}" destfile="${build.dir}/${final.name}-test.jar">
<fileset dir="${tests.src.dir}/../resources" erroronmissingdir="no"/>
</jarify>
</sequential>
</target>
cd $LUCENE_ROOT/contrib/ojvm
ant jar-core
ant jar-test
db.str=orcl
db.usr=LUCENE
db.pwd=LUCENE
dba.usr=sys
dba.pwd=change_on_install
javac.debug=true
javac.source=1.4
javac.target=1.4
db.str is your SQLNet connect string for your target database, check first with tnsping
utility, also note that for 11g/12c database user and password are case sensitive, so leave LUCENE in uppercase.
ant install-odi
Is strongly recommended before going in production that install Oracle Lucene Domain Index NCOMPed in 10g databases. NCOMP automatically translate Lucene and OJVMDirectory Java code to assembler and finally install it as dynamic link library (.so/.dll) in your Oracle home. To do this simply execute this Ant task instead of install-odi-10g target:
ant ncomp-runtime-retrotranslator-sys-code
ant ncomp-lucene-all
First verify that your database parameter java_jit_enabled is TRUE. Oracle 11g/12c includes a JIT technology which automatically translates most used Java methods to assembler. If you want to pre-compile all Lucene Java code to assembler and not wait for Oracle database detects common used code you can execute this target:
ant jit-lucene-classes
ant jit-oracle-classes