You can try working with two indexes one for all of today's messages which will be pretty small, and another for past messages. Then once a day merge the small index to the big one and start fresh. This way you need only to open an IndexReader for the small index while the big one does not change.
HTH Aviran http://www.aviransplace.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 04, 2005 8:15 PM To: java-user@lucene.apache.org Subject: Search shortly after adding a doc i want to use lucene to search shortly (within a second) after adding a document. closing a writer to ensure the new document is written and then opening an index reader seems to be too slow on large indexes. how do other people handle this? (i know this can be solved with a database but i'd like to use the tokenization/stemming features of lucene). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]