Hi,

I have a RAMDirectory based index. The document source for the index is
a database table, where content to be indexed is stored alongside a
status (pending_index, indexed, pending_delete, deleted). Each time the
application is started, and periodically thereafter, all documents from
the database that are "pending_index" or "indexed" are loaded and added
to the index. Once this is done their status is updated to
"indexed" (and this process repeats itself as required).

I would now like to keep a FSDir copy of the index, to speedup the
application start time. I am proposing to simply update both the FSDir
and RAMDir in tandem i.e. whenever a document is to be added to the
index, both Dirs are updated in one "transaction" (and the database
record is then updated to "indexed"). Then when the application is
restarted we know that all database records with a status of "indexed"
exist in the FSDir. This means I can load the FSDir into the InMem dir,
then update both with any outstanding database records which are
"pending_index".

Can anyone see any issues with the above system? Is there anything I
should be aware of when maintaining a RAMDir in parallel to a FSDir?

Regards,
Joel



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to