Hi guys, Just trying to understand where problems can occur.
Maybe I need to describe our indexing process some more. We create new indexes as "index parts" with Documents that are supposed to contain unique ID key fields. These "index parts" get merged into two separate indexes: a main index and a message index. The main index does not "store" any text (for faster search retrieval), so we create new Documents based on the old Documents and add them with the IndexWriter.addDocument method. There is also the possibility that multiple copies of the same document exist (updated versions) in the main index and the "index parts". Also multiple copies of the same document can exist in separate "index parts" as well. So what we do is build a unique list of Documents based on the unique ID field by iterating through every Document in every "index part". This entails opening and closing an IndexReader for each "index part". We then make sure that none of these documents exist in the main index. We open another IndexReader to the main index and then loop through all the Documents and run a IndexReader.delete( new Term( "ID", id ) ). The IndexReader is then closed. We then open an IndexWriter to the main index. We then loop through all the Documents again, this time do a IndexWriter.addDocument for each Document. We then close the main index. We do not optimize until the weekend. There is also another jvm running that handles searches. This could be running a search on the main index at any given moment. However, it closes the IndexSearcher after every search. Are there areas here where it can cause the problem? Roy. On Thu, 17 Mar 2005 17:52:17 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > We were noticing some odd behavior recently with our indexes. > > We have a process that adds new documents into our indexes. When we iterate > through all the documents through an IndexReader, we're not seeing the new > documents and we're not seeing the new documents when we run a search. > > However, after optimizing, suddenly those new documents appear. Its almost > as if the new segments are not being read by the IndexReader. > > Any thoughts? > > We're running on Windows NT, jdk 1.4.2 and lucene 1.4. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]