Hi, Thanks. That seems to work. I guess calling the close before the add causes the last few documents to be flushed out or something?
-----Original Message----- From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] Sent: Thursday, April 28, 2005 2:19 PM To: java-user@lucene.apache.org Subject: Re: Lucene loosing documents? Can you close the ramDirectory first and then add it via fsWriter and see if that solves it? Otis --- Mufaddal Khumri <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to index 20349 records. When I index using the > FSDirectory I > get 20349 documents - this is correct. Now when I ude the > RAMDirectory > to create my index and write all documents from the RAMDirectory to > the > FSDirectory I only get 20340 documents consistently. This is the only > change I made. Why do I loose 9 documents? > > int counter = 1; > while(counter <= 20349) > { > ramWriter.addDocument(doc); > } > > Directory d[] = {ramDir}; > fsWriter.addIndexes(d); > fsWriter.optimize(); > ramWriter.close(); > > fsWriter.close(); > > Any ideas as to why I am missing the 9 documents? > > Thanks. > > ------------------------------------------------------------------------ ------------------ > This email and any files transmitted with it are confidential > and intended solely for the use of the individual or entity > to whom they are addressed. If you have received this > email in error please notify the system manager. Please > note that any views or opinions presented in this email > are solely those of the author and do not necessarily > represent those of the company. Finally, the recipient > should check this email and any attachments for the > presence of viruses. The company accepts no liability for > any damage caused by any virus transmitted by this email. > Consult your physician prior to the use of any medical > supplies or product. > ------------------------------------------------------------------------ ------------------ > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]