lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vasu shah <>
Subject Parameterized IndexModifier
Date Tue, 17 Oct 2006 23:23:31 GMT


The IndexModifier class always opens up an IndexWriter in the init 
method. If we need to update a document, it closes the IndexWriter and 
opens up IndexReader to delete the desired document. Then again it opens 
IndexWriter to add the document to the index.

Instead can't we pass one extra parameter to the constructor that 
determines whether the operation required is exclusively insert or 
delete/update. If it is just insert, we open the IndexWriter first. If it is 
delete/update, we open IndexReader first.

If we do this will there be any issues?


How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message