You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rob Audenaerde <ro...@gmail.com> on 2015/08/27 11:22:00 UTC

Number of threads in index writer config?

Hi all,

I was wondering about the number of threads to use for indexing.

There is a setting: getMaxThreadStates() in the IndexWriterConfig that
determines how many threads can write to the index  simultaneously.

The luceneutil Indexer.java (that is used for the nightly benchmarks),
seems to use the default value (8), while it uses 20 indexing threads.

Is there a reason to not set the maxThreadStates to the number of indexing
thread?

Thanks!

Re: Number of threads in index writer config?

Posted by Michael McCandless <lu...@mikemccandless.com>.
Actually, the nightly Indexer.java (which tracks Lucene's trunk) did
set call IWC.setMaxThreadStates, up until we removed this setting
entirely in https://issues.apache.org/jira/browse/LUCENE-6659

So now (as of Lucene 5.3.0) IndexWriter lets you use as many threads
as you want.

Mike McCandless

http://blog.mikemccandless.com


On Thu, Aug 27, 2015 at 5:22 AM, Rob Audenaerde
<ro...@gmail.com> wrote:
> Hi all,
>
> I was wondering about the number of threads to use for indexing.
>
> There is a setting: getMaxThreadStates() in the IndexWriterConfig that
> determines how many threads can write to the index  simultaneously.
>
> The luceneutil Indexer.java (that is used for the nightly benchmarks),
> seems to use the default value (8), while it uses 20 indexing threads.
>
> Is there a reason to not set the maxThreadStates to the number of indexing
> thread?
>
> Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org