lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Reusing Document and Field objects
Date Mon, 18 Jan 2010 10:05:33 GMT
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.


On Mon, Jan 18, 2010 at 4:47 AM, Ganesh <> wrote:
> 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
> Send instant messages to your online friends
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message