Anyone have implemented a Database Directory ?
1 posts in topic
Flat View  Flat View

Posted By:   Joao_Machado
Posted On:   Thursday, July 25, 2002 02:27 PM

I would like to know if anyone have implemented a Database Directory and could send to me some code/thoughts about the best way to do this. I read somewhere that an Oracle Directory exists but I did not found it anywhere in the CVS.


João Machado

Re: Anyone have implemented a Database Directory ?

Posted By:   Anonymous  
Posted On:   Tuesday, August 6, 2002 02:29 PM

A friend and I have implemented a MySQL DBDirectory for Lucene. It works, but we are sure that it is not the most efficient way to do it.

This is how we did it.

The DbDirectory class is basically the RAMDirectory class from the lucene jar, but with a few changes (RAMFile is now DbFile, etc...) At first, to see if it would work, I just serialized the DbDirectoy class and store that, but it gets too big too fast. Then we saw that you only have to store the files that are in the Hashtable (String fileNames, DbFile) where a DbFile is much like the RAMFile only altered :) This way you can also randomly access the segments when needed (although we haven't done that yet). Anyway if you would like some code send me an email. I hope this helps...

About | Sitemap | Contact