lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Condit <>
Subject Using IndexWriterConfig repeatedly in 3.1
Date Fri, 01 Apr 2011 20:07:12 GMT
I see in the JavaDoc for IndexWriterConfig that:
"Note that IndexWriter makes a private clone; if you need to
subsequently change settings use IndexWriter.getConfig()."

However when I attempt to use the same IndexWriterConfig to create
multiple IndexWriters the following exception is thrown:

org.apache.lucene.util.SetOnce$AlreadySetException: The object cannot be
set twice!
	at org.apache.lucene.util.SetOnce.set(
	at org.apache.lucene.index.MergePolicy.setIndexWriter(
	at org.apache.lucene.index.IndexWriter.<init>(

Is this the intended design? Is there a way to use the configuration
multiple times? I see that clone won't work since it's shallow...


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

View raw message