The standard pattern for updating an index - removing a document then re-adding the modified document to the index - is currently a significant performance bottleneck in my application. I sometimes need to update ~1000 documents at a time. The major cost of this pattern as far as I can see is IndexWriter.close (). Average times for an update to an FSDirectory look like this:

delete document: 7 ms
create document: 6 ms
add document: 11 ms
IndexWriter.close: 59 ms

Is there a way to synchronize IndexWriter and IndexReader so that a call to IndexWriter.close is not required for each update? I guess I mean to ask if there is a *simple* way to do this. I imagine that one could write an IndexUpdater class which manages the synchronization of Locks, temp files, etc.

Thanks,

Chris




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to