lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aigner, Thomas" <TAig...@WescoDist.com>
Subject Insert new records into index
Date Fri, 11 Nov 2005 14:55:54 GMT
Howdy all,
	I am having a problem with inserting/updating records into my
index.  I have approximately 1.5M records in the index taking about 2.5G
space when optimized.  

If I want to update 1000 records, I delete the old item and insert the
new one.  This is taking a LONG time to accomplish.  I believe this is
taking time due to the fact that I have to close the writer to delete
from the reader, then open the writer to insert the new record.  I have
to do this 1 time for each item that needs to be inserted.  

I tried to not optimize the index, thinking that opening the
index/closing it was taking the big time, but the time seems to be the
same when I have many files ( I had to uncrease the ulimit by quite a
few to avoid the too many files error as well).

Snippets of code..
To delete a record, I am:
	//Close the index
	writer.close();
		
	//Instantiate the reader object for deletion
	IndexReader reader = IndexReader.open(dir);

	reader.delete(new Term("simm",simm));
      reader.close();

      //Get directory again and Create a new writer to open for insert

Then insert the record.. and move to the next record


I can't keep the writer open to delete an item cause I get this error:
	Lock obtain timed out: Lock@

Anyone have any ideas on how to speed this process up?  


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


Mime
View raw message