Spinoff from #4810.
I don't like that IndexWriterConfig's setters are chainable; it
results in code in our tests like this:
IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)).setMaxBufferedDocs(2).setMergePolicy(newLogMergePolicy()));
I think in general we should avoid chaining since it encourages hard
to read code (code is already hard enough to read!).
Migrated from LUCENE-3756 by Michael McCandless (@mikemccand), updated Feb 10 2012
Spinoff from #4810.
I don't like that IndexWriterConfig's setters are chainable; it
results in code in our tests like this:
I think in general we should avoid chaining since it encourages hard
to read code (code is already hard enough to read!).
Migrated from LUCENE-3756 by Michael McCandless (@mikemccand), updated Feb 10 2012