On Mon, Nov 29, 2010 at 2:52 PM, Michael McCandless
<[email protected]> wrote:
> Though why doesn't the random seed reproduce it?
OK, I think I see why.
For reproducibility, the same random number generator should never be
used across different threads.
RandomIndexWriter does though... (via MockIndexWriter.testPoint).
public RandomIndexWriter(Random r, Directory dir, IndexWriterConfig
c) throws IOException {
this.r = r;
w = new MockIndexWriter(r, dir, c);
So something like this should work?
w = new MockIndexWriter(new Random(r.nextInt()), dir, c);
-Yonik
http://www.lucidimagination.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]