On Wednesday 17 May 2006 12:03, Yonik Seeley wrote: > On 5/17/06, Martin Kobele <[EMAIL PROTECTED]> wrote: > > several threads add document to the same index. > > As noted in the FAQ, adding documents is thread safe. > > (I even synchronize my static index writer when I add documents. just to > > make sure.) > > > > However, after addind all my documents, the index does not contain all of > > the documents. > > We add documents via multiple threads all the time... no problems. > Are you explicitly closing the IndexWriter only *after* all of your > theads are finised adding docs?
yes, I wait until all the threads are done. Then I do a ctrl-c which sends a signal to all threads to close the index writer. > > There may also be a bug in your code that adds the 512 documents (not > synchronizing the clients properly could cause your count to be off). luke tells me how many documents are in my index. I open the index in luke after I closed my app. all I do is this (after creating the document): synchronized(fswriter){ fswriter.addDocument(tempDoc); } > -Yonik > http://incubator.apache.org/solr Solr, the open-source Lucene search server > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Kobele Software Engineer Netsweeper Inc. 512 Woolwich Street, Suite 4 Guelph, Ontario N1H 3X7 [EMAIL PROTECTED] Tel: 519-826-5222 ext. 224 Fax: 519-826-5228 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]