Re: Reusing Document and Field objects

2010-01-18 Thread Ian Lea
There's a section on reusing Fields and Documents in http://wiki.apache.org/lucene-java/ImproveIndexingSpeed. And lots of other good tips. -- Ian. On Mon, Jan 18, 2010 at 10:05 AM, Michael McCandless wrote: > It should give some perf improvement, reducing GC costs. > > But you don't need to se

Re: Reusing Document and Field objects

2010-01-18 Thread Michael McCandless
It should give some perf improvement, reducing GC costs. But you don't need to set field values to null -- just set to the values of the next doc to index, and index with that. If your machine has available hardware concurrency, using threads should give you even more gains. Mike On Mon, Jan 18

Reusing Document and Field objects

2010-01-18 Thread Ganesh
Hello all, I am indexing millions of documents. The app is single threaded. I need to create Document and Fields objects repeatedly. I have a thought to create it once and reuse by setting the field values to null. Is this advisable, Will it give any performance improvement? Regards Ganesh