Github user synhershko commented on a diff in the pull request:
https://github.com/apache/lucenenet/pull/172#discussion_r71072173
--- Diff: src/Lucene.Net.TestFramework/Index/RandomIndexWriter.cs ---
@@ -85,24 +85,24 @@ public static IndexWriter MockIndexWriter(Directory
dir, IndexWriterConfig conf,
/// <summary>
/// create a RandomIndexWriter with a random config: Uses
TEST_VERSION_CURRENT and MockAnalyzer </summary>
- public RandomIndexWriter(Random r, Directory dir)
- : this(r, dir, LuceneTestCase.NewIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r)))
- {
- }
+ //public RandomIndexWriter(Random r, Directory dir)
+ // : this(r, dir, LuceneTestCase.NewIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r)))
+ //{
+ //}
/// <summary>
/// create a RandomIndexWriter with a random config: Uses
TEST_VERSION_CURRENT </summary>
- public RandomIndexWriter(Random r, Directory dir, Analyzer a)
- : this(r, dir, LuceneTestCase.NewIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, a))
- {
- }
+ //public RandomIndexWriter(Random r, Directory dir, Analyzer a)
+ // : this(r, dir, LuceneTestCase.NewIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, a))
+ //{
+ //}
/// <summary>
/// create a RandomIndexWriter with a random config </summary>
- public RandomIndexWriter(Random r, Directory dir, LuceneVersion v,
Analyzer a)
- : this(r, dir, LuceneTestCase.NewIndexWriterConfig(r, v, a))
- {
- }
+ //public RandomIndexWriter(Random r, Directory dir, LuceneVersion
v, Analyzer a)
+ // : this(r, dir, LuceneTestCase.NewIndexWriterConfig(r, v, a))
+ //{
+ //}
--- End diff --
Why was removing these necessary? can't you just replace the calls to
`LuceneTestCase.NewIndexWriterConfig` with just `new IndexWriterConfig` - or
make that method threadsafe?
Since this PR makes us diverge from the original codebase, we want to try
and minimize the amount of changes this will cause - and need to be maintained
or commented properly so future updates / ports don't override it. By leaving
the methods here the way they originally were (and fixing the thread safety
issues they I assume pose) we can reduce the amount of changes in the PR
significantlly. WDYT?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---