lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Freireich" <>
Subject RE: A Database as a Lucene Index Target
Date Wed, 11 Jan 2006 16:19:36 GMT
I'm interested in the type of work you are doing with Lucene.  
I own an extremely focused talent agency, Core Search Group. We
represent the top infrastructure software engineers in the world to
companies that must have the best talent possible to realize their
Most of our clients are in the US.  Do you have any desire to work in
the states at some point in the future?  Your email address indicates
you are located in Israel now. 
Thanks for your time.
Dave Freireich
Core Search Group
Where software talent is number one.
803-771-4289 x12
-----Original Message-----
From: [] On Behalf Of
Amir Kibbar
Sent: Wednesday, January 11, 2006 10:44 AM
Subject: A Database as a Lucene Index Target

I hope that this mailing list is the right place for things like that,
if not I apologize in advance.

I've written an extension for the Directory object called DBDirectory,
that allows you to read and write a Lucene index to a database instead
of a file system. 

This is done using blobs. Each blob represents a "file". Also, each blob
has a name which is equivalent to the filename and a prefix, which is
equivalent to a directory on a file system. This allows you to create
multiple Lucene indexes in a single database schema. 

The solution uses two tables:
LUCENE_INDEX - which holds the index files as blobs
LUCENE_LOCK - holds the different locks

Attached is my proposed solution. This solution is still very basic, but
it does the job. 
The solution supports Oracle and mysql

To use this solution:

1. Place the files:
- DBDirectory in src/java/org/apache/lucene/store
- TestDBIndex in src/test/org/apache/lucene/index
- objects-mysql.sql in src/db
- objects-oracle.sql in src/db

2. Edit the parameters for the database connection in TestDBIndex

3. Create the database tables using the objects-mysql.sql script
(assuming you're using mysql)

4. Build Lucene

5. Run TestDBIndex with the database driver in the classpath

I've tested the solution on mysql, but it *should* work on Oracle, I
will test that in a few days.

Please let me know if you think it is useful. 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message