lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [08/32] lucenenet git commit: Fixing build errors from adding extra params to RandomIndexWriter
Date Fri, 12 Aug 2016 13:25:21 GMT
Fixing build errors from adding extra params to RandomIndexWriter


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/6f3e8079
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/6f3e8079
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/6f3e8079

Branch: refs/heads/master
Commit: 6f3e8079447bd9ac4f38119b1bdaebfa7690214a
Parents: ab57fd1
Author: Connie Yau <conniey@microsoft.com>
Authored: Fri Jul 22 09:31:02 2016 -0700
Committer: Connie Yau <conniey@microsoft.com>
Committed: Fri Jul 22 12:23:53 2016 -0700

----------------------------------------------------------------------
 .../Index/BaseDocValuesFormatTestCase.cs        | 24 ++---
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  6 +-
 .../Index/BaseTermVectorsFormatTestCase.cs      | 14 +--
 .../ClassificationTestBase.cs                   |  2 +-
 .../TestDemoExpressions.cs                      |  2 +-
 .../TestExpressionRescorer.cs                   |  2 +-
 .../TestExpressionSorts.cs                      |  2 +-
 .../Range/TestRangeFacetCounts.cs               |  8 +-
 .../SortedSet/TestSortedSetDocValuesFacets.cs   | 10 +-
 .../Taxonomy/TestTaxonomyFacetAssociations.cs   |  8 +-
 .../Taxonomy/TestTaxonomyFacetCounts.cs         | 16 ++--
 .../Taxonomy/TestTaxonomyFacetSumValueSource.cs |  6 +-
 src/Lucene.Net.Tests.Facet/TestDrillSideways.cs |  8 +-
 .../TestRandomSamplingFacetsCollector.cs        |  2 +-
 src/Lucene.Net.Tests.Join/TestBlockJoin.cs      | 18 ++--
 .../ChainedFilterTest.cs                        |  4 +-
 .../Mlt/TestMoreLikeThis.cs                     |  2 +-
 src/Lucene.Net.Tests.Queries/TermFilterTest.cs  |  2 +-
 src/Lucene.Net.Tests.Queries/TermsFilterTest.cs |  6 +-
 .../core/Analysis/TestCachingTokenFilter.cs     |  2 +-
 .../TestCompressingTermVectorsFormat.cs         |  2 +-
 .../core/Document/TestBinaryDocument.cs         |  2 +-
 .../core/Document/TestDocument.cs               | 10 +-
 .../core/Index/TestBinaryTerms.cs               |  2 +-
 .../core/Index/TestCompoundFile.cs              |  2 +-
 .../core/Index/TestDirectoryReader.cs           |  2 +-
 src/Lucene.Net.Tests/core/Index/TestDocCount.cs |  2 +-
 .../core/Index/TestDocsAndPositions.cs          |  4 +-
 .../core/Index/TestIndexWriter.cs               |  4 +-
 .../core/Index/TestIndexWriterDelete.cs         |  4 +-
 .../core/Index/TestIndexWriterExceptions.cs     |  4 +-
 .../core/Index/TestIndexableField.cs            |  2 +-
 .../core/Index/TestIsCurrent.cs                 |  2 +-
 .../core/Index/TestOmitPositions.cs             |  4 +-
 src/Lucene.Net.Tests/core/Index/TestPayloads.cs |  2 +-
 .../core/Index/TestPayloadsOnVectors.cs         |  4 +-
 .../core/Index/TestPostingsOffsets.cs           |  2 +-
 src/Lucene.Net.Tests/core/Index/TestRollback.cs |  2 +-
 .../core/Index/TestSameTokenSamePosition.cs     |  4 +-
 .../core/Index/TestStressAdvance.cs             |  2 +-
 .../core/Index/TestSumDocFreq.cs                |  2 +-
 .../core/Index/TestTermVectorsReader.cs         |  2 +-
 .../core/Index/TestTermsEnum.cs                 |  2 +-
 .../core/Search/Similarities/TestSimilarity2.cs | 14 +--
 .../Search/Similarities/TestSimilarityBase.cs   |  2 +-
 .../Spans/TestSpanMultiTermQueryWrapper.cs      |  2 +-
 .../core/Search/TestAutomatonQuery.cs           |  2 +-
 .../core/Search/TestAutomatonQueryUnicode.cs    |  2 +-
 .../core/Search/TestBooleanOr.cs                |  2 +-
 .../core/Search/TestBooleanQuery.cs             |  4 +-
 .../core/Search/TestBooleanScorer.cs            |  6 +-
 .../core/Search/TestCachingWrapperFilter.cs     | 10 +-
 .../core/Search/TestConstantScoreQuery.cs       |  2 +-
 .../core/Search/TestDateSort.cs                 |  2 +-
 .../core/Search/TestDocIdSet.cs                 |  4 +-
 .../core/Search/TestDocValuesScoring.cs         |  2 +-
 .../core/Search/TestEarlyTermination.cs         |  2 +-
 .../core/Search/TestFuzzyQuery.cs               |  6 +-
 .../core/Search/TestIndexSearcher.cs            |  4 +-
 .../core/Search/TestMinShouldMatch2.cs          |  2 +-
 .../core/Search/TestMultiPhraseQuery.cs         |  2 +-
 .../core/Search/TestNGramPhraseQuery.cs         |  2 +-
 .../core/Search/TestPhraseQuery.cs              |  2 +-
 .../Search/TestPositiveScoresOnlyCollector.cs   |  2 +-
 .../core/Search/TestPrefixFilter.cs             |  2 +-
 .../core/Search/TestPrefixInBooleanQuery.cs     |  2 +-
 .../core/Search/TestPrefixQuery.cs              |  2 +-
 .../core/Search/TestQueryRescorer.cs            | 10 +-
 .../core/Search/TestQueryWrapperFilter.cs       |  4 +-
 .../core/Search/TestRegexpQuery.cs              |  2 +-
 .../Search/TestScoreCachingWrappingScorer.cs    |  2 +-
 .../core/Search/TestSearchAfter.cs              |  2 +-
 .../core/Search/TestSearchWithThreads.cs        |  2 +-
 .../core/Search/TestSearcherManager.cs          |  2 +-
 .../core/Search/TestSloppyPhraseQuery.cs        |  6 +-
 src/Lucene.Net.Tests/core/Search/TestSort.cs    | 98 ++++++++++----------
 .../core/Search/TestSortDocValues.cs            | 54 +++++------
 .../core/Search/TestSortRescorer.cs             |  4 +-
 .../core/Search/TestTopDocsCollector.cs         |  2 +-
 .../core/Search/TestTopDocsMerge.cs             |  2 +-
 .../core/Search/TestTopFieldCollector.cs        |  2 +-
 .../core/Search/TestTopScoreDocCollector.cs     |  2 +-
 82 files changed, 244 insertions(+), 244 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index 9be51c3..2f14fe5 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -88,7 +88,7 @@ namespace Lucene.Net.Index
         public void TestOneNumber()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             string longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
             string text = "this is the text to be indexed. " + longTerm;
@@ -123,7 +123,7 @@ namespace Lucene.Net.Index
         public void TestOneFloat()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             string longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
             string text = "this is the text to be indexed. " + longTerm;
@@ -158,7 +158,7 @@ namespace Lucene.Net.Index
         public void TestTwoNumbers()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             string longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
             string text = "this is the text to be indexed. " + longTerm;
@@ -196,7 +196,7 @@ namespace Lucene.Net.Index
         public void TestTwoBinaryValues()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             string longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
             string text = "this is the text to be indexed. " + longTerm;
@@ -237,7 +237,7 @@ namespace Lucene.Net.Index
         public void TestTwoFieldsMixed()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             string longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
             string text = "this is the text to be indexed. " + longTerm;
@@ -277,7 +277,7 @@ namespace Lucene.Net.Index
         public void TestThreeFieldsMixed()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             string longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
             string text = "this is the text to be indexed. " + longTerm;
@@ -322,7 +322,7 @@ namespace Lucene.Net.Index
         public void TestThreeFieldsMixed2()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             string longTerm = "longtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongtermlongterm";
             string text = "this is the text to be indexed. " + longTerm;
@@ -1835,7 +1835,7 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new SortedSetDocValuesField("field", new BytesRef("hello")));
@@ -1863,7 +1863,7 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new SortedSetDocValuesField("field", new BytesRef("hello")));
@@ -1946,7 +1946,7 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new SortedSetDocValuesField("field", new BytesRef("hello")));
@@ -1979,7 +1979,7 @@ namespace Lucene.Net.Index
         {
             AssumeTrue("Codec does not support SORTED_SET", DefaultCodecSupportsSortedSet());
             Directory directory = NewDirectory();
-            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter iwriter = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new SortedSetDocValuesField("field", new BytesRef("world")));
@@ -3476,7 +3476,7 @@ namespace Lucene.Net.Index
                     break;
                 }
                 Directory dir = NewDirectory();
-                RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+                RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
                 BytesRef bytes = new BytesRef();
                 bytes.Bytes = new byte[1 << i];
                 bytes.Length = 1 << i;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index db140dd..fe01aab 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -263,7 +263,7 @@ namespace Lucene.Net.Index
         public void TestNumericField()
         {
             Directory dir = NewDirectory();
-            var w = new RandomIndexWriter(Random(), dir);
+            var w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             var numDocs = AtLeast(500);
             var answers = new object[numDocs];
             FieldType.NumericType[] typeAnswers = new FieldType.NumericType[numDocs];
@@ -348,7 +348,7 @@ namespace Lucene.Net.Index
         public void TestIndexedBit()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType onlyStored = new FieldType();
             onlyStored.Stored = true;
@@ -766,7 +766,7 @@ namespace Lucene.Net.Index
             }
             w.Commit();
             w.Dispose();
-            w = new RandomIndexWriter(Random(), dir);
+            w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             w.ForceMerge(TestUtil.NextInt(Random(), 1, 3));
             w.Commit();
             w.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index d48b6f8..97b9e59 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -675,7 +675,7 @@ namespace Lucene.Net.Index
                 int docWithVectors = Random().Next(numDocs);
                 Document emptyDoc = new Document();
                 Directory dir = NewDirectory();
-                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
                 RandomDocument doc = docFactory.NewDocument(TestUtil.NextInt(Random(), 1, 3), 20, options);
                 for (int i = 0; i < numDocs; ++i)
                 {
@@ -722,7 +722,7 @@ namespace Lucene.Net.Index
                     continue;
                 }
                 using (Directory dir = NewDirectory())
-                using (RandomIndexWriter writer = new RandomIndexWriter(Random(), dir))
+                using (RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone))
                 {
                     RandomDocument doc = docFactory.NewDocument(TestUtil.NextInt(Random(), 1, 2), AtLeast(20000),
                         options);
@@ -740,7 +740,7 @@ namespace Lucene.Net.Index
             foreach (Options options in ValidOptions())
             {
                 Directory dir = NewDirectory();
-                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
                 RandomDocument doc = docFactory.NewDocument(AtLeast(100), 5, options);
                 writer.AddDocument(doc.ToDocument());
                 IndexReader reader = writer.Reader;
@@ -767,7 +767,7 @@ namespace Lucene.Net.Index
                     }
                     using (Directory dir = NewDirectory())
                     {
-                        using (var writer = new RandomIndexWriter(Random(), dir))
+                        using (var writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone))
                         {
                             RandomDocument doc1 = docFactory.NewDocument(numFields, 20, options1);
                             RandomDocument doc2 = docFactory.NewDocument(numFields, 20, options2);
@@ -797,7 +797,7 @@ namespace Lucene.Net.Index
                 docs[i] = docFactory.NewDocument(TestUtil.NextInt(Random(), 1, 3), TestUtil.NextInt(Random(), 10, 50), RandomOptions());
             }
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < numDocs; ++i)
             {
                 writer.AddDocument(AddId(docs[i].ToDocument(), "" + i));
@@ -832,7 +832,7 @@ namespace Lucene.Net.Index
                     docs[i] = docFactory.NewDocument(TestUtil.NextInt(Random(), 1, 3), AtLeast(10), options);
                 }
                 Directory dir = NewDirectory();
-                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
                 for (int i = 0; i < numDocs; ++i)
                 {
                     writer.AddDocument(AddId(docs[i].ToDocument(), "" + i));
@@ -877,7 +877,7 @@ namespace Lucene.Net.Index
                     docs[i] = docFactory.NewDocument(TestUtil.NextInt(Random(), 1, 3), AtLeast(10), options);
                 }
                 Directory dir = NewDirectory();
-                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+                RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
                 for (int i = 0; i < numDocs; ++i)
                 {
                     writer.AddDocument(AddId(docs[i].ToDocument(), "" + i));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Classification/ClassificationTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Classification/ClassificationTestBase.cs b/src/Lucene.Net.Tests.Classification/ClassificationTestBase.cs
index 269d8c4..4762408 100644
--- a/src/Lucene.Net.Tests.Classification/ClassificationTestBase.cs
+++ b/src/Lucene.Net.Tests.Classification/ClassificationTestBase.cs
@@ -57,7 +57,7 @@ namespace Lucene.Net.Classification
         {
             base.SetUp();
             dir = NewDirectory();
-            indexWriter = new RandomIndexWriter(Random(), dir);
+            indexWriter = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             textFieldName = "text";
             categoryFieldName = "cat";
             booleanFieldName = "bool";

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs b/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
index 3adc45a..5e99845 100644
--- a/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
@@ -25,7 +25,7 @@ namespace Lucene.Net.Tests.Expressions
 		{
 			base.SetUp();
 			dir = NewDirectory();
-			var iw = new RandomIndexWriter(Random(), dir);
+			var iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 			var doc = new Document
 			{
 			    NewStringField("id", "1", Field.Store.YES),

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
index 301e6f9..9c0d15c 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
@@ -21,7 +21,7 @@ namespace Lucene.Net.Tests.Expressions
 		{
 			base.SetUp();
 			dir = NewDirectory();
-			var iw = new RandomIndexWriter(Random(), dir);
+			var iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 			var doc = new Document
 			{
 			    NewStringField("id", "1", Field.Store.YES),

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
index d6b0fef..a69a93c 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
@@ -32,7 +32,7 @@ namespace Lucene.Net.Tests.Expressions
         {
             base.SetUp();
             dir = NewDirectory();
-            var iw = new RandomIndexWriter(Random(), dir);
+            var iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int numDocs = TestUtil.NextInt(Random(), 2049, 4000);
             for (int i = 0; i < numDocs; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs b/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
index bb09c43..d2a296b 100644
--- a/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
+++ b/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
@@ -386,7 +386,7 @@ namespace Lucene.Net.Facet.Range
         public virtual void TestRandomLongs()
         {
             Directory dir = NewDirectory();
-            var w = new RandomIndexWriter(Random(), dir);
+            var w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             int numDocs = AtLeast(1000);
             if (VERBOSE)
@@ -579,7 +579,7 @@ namespace Lucene.Net.Facet.Range
         public virtual void TestRandomFloats()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             int numDocs = AtLeast(1000);
             float[] values = new float[numDocs];
@@ -784,7 +784,7 @@ namespace Lucene.Net.Facet.Range
         public virtual void TestRandomDoubles()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             int numDocs = AtLeast(1000);
             double[] values = new double[numDocs];
@@ -1006,7 +1006,7 @@ namespace Lucene.Net.Facet.Range
         public virtual void TestCustomDoublesValueSource()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             writer.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs b/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
index 091a2c8..51c26ec 100644
--- a/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
+++ b/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
@@ -56,7 +56,7 @@ namespace Lucene.Net.Facet.SortedSet
 
             FacetsConfig config = new FacetsConfig();
             config.SetMultiValued("a", true);
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new SortedSetDocValuesFacetField("a", "foo"));
@@ -105,7 +105,7 @@ namespace Lucene.Net.Facet.SortedSet
             AssumeTrue("Test requires SortedSetDV support", DefaultCodecSupportsSortedSet());
             Directory dir = NewDirectory();
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             FacetsConfig config = new FacetsConfig();
 
@@ -153,7 +153,7 @@ namespace Lucene.Net.Facet.SortedSet
             AssumeTrue("Test requires SortedSetDV support", DefaultCodecSupportsSortedSet());
             Directory dir = NewDirectory();
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             FacetsConfig config = new FacetsConfig();
 
@@ -211,7 +211,7 @@ namespace Lucene.Net.Facet.SortedSet
             AssumeTrue("Test requires SortedSetDV support", DefaultCodecSupportsSortedSet());
             Directory dir = NewDirectory();
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             FacetsConfig config = new FacetsConfig();
 
@@ -253,7 +253,7 @@ namespace Lucene.Net.Facet.SortedSet
             AssumeTrue("Test requires SortedSetDV support", DefaultCodecSupportsSortedSet());
             Directory dir = NewDirectory();
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             FacetsConfig config = new FacetsConfig();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs
index 06057ce..74f66f3 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetAssociations.cs
@@ -62,7 +62,7 @@ namespace Lucene.Net.Facet.Taxonomy
             config.SetIndexFieldName("float", "$facets.float");
             config.SetMultiValued("float", true);
 
-            var writer = new RandomIndexWriter(Random(), dir);
+            var writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             // index documents, 50% have only 'b' and all have 'a'
             for (int i = 0; i < 110; i++)
@@ -190,7 +190,7 @@ namespace Lucene.Net.Facet.Taxonomy
 
             TaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir);
             FacetsConfig config = new FacetsConfig();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new IntAssociationFacetField(14, "a", "x"));
@@ -216,7 +216,7 @@ namespace Lucene.Net.Facet.Taxonomy
             TaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir);
             FacetsConfig config = new FacetsConfig();
             config.SetHierarchical("a", true);
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new IntAssociationFacetField(14, "a", "x"));
@@ -241,7 +241,7 @@ namespace Lucene.Net.Facet.Taxonomy
             TaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir);
             FacetsConfig config = new FacetsConfig();
             config.SetRequireDimCount("a", true);
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new IntAssociationFacetField(14, "a", "x"));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
index 8038313..27aba82 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
@@ -67,7 +67,7 @@ namespace Lucene.Net.Facet.Taxonomy
             FacetsConfig config = new FacetsConfig();
             config.SetHierarchical("Publish Date", true);
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new FacetField("Author", "Bob"));
@@ -152,7 +152,7 @@ namespace Lucene.Net.Facet.Taxonomy
             // main index:
             var taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             FacetsConfig config = new FacetsConfig();
 
             Document doc = new Document();
@@ -214,7 +214,7 @@ namespace Lucene.Net.Facet.Taxonomy
 
             FacetsConfig config = new FacetsConfig();
             config.SetIndexFieldName("a", "$facets2");
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new FacetField("a", "foo1"));
@@ -318,7 +318,7 @@ namespace Lucene.Net.Facet.Taxonomy
             FacetsConfig config = new FacetsConfig();
             config.SetHierarchical("a", true);
             config.SetMultiValued("a", true);
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(NewTextField("field", "text", Field.Store.NO));
@@ -364,7 +364,7 @@ namespace Lucene.Net.Facet.Taxonomy
         {
             Store.Directory dir = NewDirectory();
             Store.Directory taxoDir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             var taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
 
             FacetsConfig config = new FacetsConfig();
@@ -399,7 +399,7 @@ namespace Lucene.Net.Facet.Taxonomy
         {
             Store.Directory dir = NewDirectory();
             Store.Directory taxoDir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             DirectoryTaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
 
             FacetsConfig config = new FacetsConfig();
@@ -510,7 +510,7 @@ namespace Lucene.Net.Facet.Taxonomy
             Store.Directory dir = NewDirectory();
             Store.Directory taxoDir = NewDirectory();
             var taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
-            var writer = new RandomIndexWriter(Random(), dir);
+            var writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             FacetsConfig config = new FacetsConfig();
 
             Document doc = new Document();
@@ -536,7 +536,7 @@ namespace Lucene.Net.Facet.Taxonomy
             Store.Directory dir = NewDirectory();
             Store.Directory taxoDir = NewDirectory();
             TaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             FacetsConfig config = new FacetsConfig();
 
             Document doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
index d425a1a..3ec1ef6 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
@@ -75,7 +75,7 @@ namespace Lucene.Net.Facet.Taxonomy
             // main index:
             DirectoryTaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             FacetsConfig config = new FacetsConfig();
 
             // Reused across documents, to add the necessary facet
@@ -144,7 +144,7 @@ namespace Lucene.Net.Facet.Taxonomy
             // main index:
             var taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             FacetsConfig config = new FacetsConfig();
 
             Document doc = new Document();
@@ -213,7 +213,7 @@ namespace Lucene.Net.Facet.Taxonomy
             FacetsConfig config = new FacetsConfig();
             config.SetIndexFieldName("a", "$facets2");
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new IntField("num", 10, Field.Store.NO));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs b/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
index 00cb772..e0add44 100644
--- a/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
+++ b/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
@@ -81,7 +81,7 @@ namespace Lucene.Net.Facet
             FacetsConfig config = new FacetsConfig();
             config.SetHierarchical("Publish Date", true);
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(new FacetField("Author", "Bob"));
@@ -252,7 +252,7 @@ namespace Lucene.Net.Facet
         {
             Directory dir = NewDirectory();
             Directory taxoDir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             // Writes facet ords to a separate directory from the
             // main index:
@@ -308,7 +308,7 @@ namespace Lucene.Net.Facet
         {
             Directory dir = NewDirectory();
             Directory taxoDir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             // Writes facet ords to a separate directory from the
             // main index:
@@ -1307,7 +1307,7 @@ namespace Lucene.Net.Facet
             // LUCENE-5045: make sure DrillSideways works with an empty index
             Directory dir = NewDirectory();
             Directory taxoDir = NewDirectory();
-            var writer = new RandomIndexWriter(Random(), dir);
+            var writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             var taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
             IndexSearcher searcher = NewSearcher(writer.Reader);
             var taxoReader = new DirectoryTaxonomyReader(taxoWriter);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Facet/TestRandomSamplingFacetsCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/TestRandomSamplingFacetsCollector.cs b/src/Lucene.Net.Tests.Facet/TestRandomSamplingFacetsCollector.cs
index afd46e5..69df3c9 100644
--- a/src/Lucene.Net.Tests.Facet/TestRandomSamplingFacetsCollector.cs
+++ b/src/Lucene.Net.Tests.Facet/TestRandomSamplingFacetsCollector.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Facet
             Directory taxoDir = NewDirectory();
 
             DirectoryTaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir);
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             FacetsConfig config = new FacetsConfig();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Join/TestBlockJoin.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/TestBlockJoin.cs b/src/Lucene.Net.Tests.Join/TestBlockJoin.cs
index d43b2df..2359946 100644
--- a/src/Lucene.Net.Tests.Join/TestBlockJoin.cs
+++ b/src/Lucene.Net.Tests.Join/TestBlockJoin.cs
@@ -131,7 +131,7 @@ namespace Lucene.Net.Tests.Join
         public void TestSimple()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             IList<Document> docs = new List<Document>();
 
@@ -221,7 +221,7 @@ namespace Lucene.Net.Tests.Join
         public void TestBugCausedByRewritingTwice()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             IList<Document> docs = new List<Document>();
 
@@ -278,7 +278,7 @@ namespace Lucene.Net.Tests.Join
         public virtual void TestSimpleFilter()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             IList<Document> docs = new List<Document>();
             docs.Add(MakeJob("java", 2007));
@@ -376,7 +376,7 @@ namespace Lucene.Net.Tests.Join
         public void TestBoostBug()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             IndexReader r = w.Reader;
             w.Dispose();
             IndexSearcher s = NewSearcher(r);
@@ -521,7 +521,7 @@ namespace Lucene.Net.Tests.Join
             IList<int> toDelete = new List<int>();
 
             // TODO: parallel star join, nested join cases too!
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             RandomIndexWriter joinW = new RandomIndexWriter(Random(), joinDir);
             for (int parentDocID = 0; parentDocID < numParentDocs; parentDocID++)
             {
@@ -1125,7 +1125,7 @@ namespace Lucene.Net.Tests.Join
         public void TestMultiChildTypes()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             IList<Document> docs = new List<Document>();
 
@@ -1212,7 +1212,7 @@ namespace Lucene.Net.Tests.Join
         public void TestAdvanceSingleParentSingleChild()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document childDoc = new Document();
             childDoc.Add(NewStringField("child", "1", Field.Store.NO));
             Document parentDoc = new Document();
@@ -1271,7 +1271,7 @@ namespace Lucene.Net.Tests.Join
         {
 
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             IList<Document> docs = new List<Document>();
             docs.Add(MakeJob("ruby", 2005));
@@ -1547,7 +1547,7 @@ namespace Lucene.Net.Tests.Join
         public void TestAdvanceSingleDeletedParentNoChild()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             // First doc with 1 children
             Document parentDoc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Queries/ChainedFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/ChainedFilterTest.cs b/src/Lucene.Net.Tests.Queries/ChainedFilterTest.cs
index 66be39a..9d63a8c 100644
--- a/src/Lucene.Net.Tests.Queries/ChainedFilterTest.cs
+++ b/src/Lucene.Net.Tests.Queries/ChainedFilterTest.cs
@@ -28,7 +28,7 @@ namespace Lucene.Net.Tests.Queries
         {
             base.SetUp();
             directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             // we use the default Locale/TZ since LuceneTestCase randomizes it
             var cal = new DateTime(1970, 1, 1, 0, 0, 0, (int)TestUtil.NextLong(Random(), 0, long.MaxValue), new GregorianCalendar());
 
@@ -160,7 +160,7 @@ namespace Lucene.Net.Tests.Queries
         public virtual void TestWithCachingFilter()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             IndexReader reader = writer.Reader;
             writer.Dispose();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Queries/Mlt/TestMoreLikeThis.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/Mlt/TestMoreLikeThis.cs b/src/Lucene.Net.Tests.Queries/Mlt/TestMoreLikeThis.cs
index 49811fe..b528d57 100644
--- a/src/Lucene.Net.Tests.Queries/Mlt/TestMoreLikeThis.cs
+++ b/src/Lucene.Net.Tests.Queries/Mlt/TestMoreLikeThis.cs
@@ -22,7 +22,7 @@ namespace Lucene.Net.Tests.Queries.Mlt
         {
             base.SetUp();
             directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             // Add series of docs with specific information for MoreLikeThis
             AddDoc(writer, "lucene");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/TermFilterTest.cs b/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
index 25c442f..ef19de1 100644
--- a/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
+++ b/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
@@ -54,7 +54,7 @@ namespace Lucene.Net.Tests.Queries
         public void TestRandom()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int num = AtLeast(100);
             var terms = new List<Term>();
             for (int i = 0; i < num; i++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests.Queries/TermsFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/TermsFilterTest.cs b/src/Lucene.Net.Tests.Queries/TermsFilterTest.cs
index 1798e3c..6fbd43f 100644
--- a/src/Lucene.Net.Tests.Queries/TermsFilterTest.cs
+++ b/src/Lucene.Net.Tests.Queries/TermsFilterTest.cs
@@ -114,7 +114,7 @@ namespace Lucene.Net.Tests.Queries
         public void TestFieldNotPresent()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int num = AtLeast(3);
             int skip = Random().Next(num);
             var terms = new List<Term>();
@@ -150,7 +150,7 @@ namespace Lucene.Net.Tests.Queries
         public void TestSkipField()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int num = AtLeast(10);
             var terms = new HashSet<Term>();
             for (int i = 0; i < num; i++)
@@ -192,7 +192,7 @@ namespace Lucene.Net.Tests.Queries
         public void TestRandom()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int num = AtLeast(100);
             bool singleField = Random().NextBoolean();
             IList<Term> terms = new List<Term>();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Analysis/TestCachingTokenFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Analysis/TestCachingTokenFilter.cs b/src/Lucene.Net.Tests/core/Analysis/TestCachingTokenFilter.cs
index 6cce5bd..004a4ac 100644
--- a/src/Lucene.Net.Tests/core/Analysis/TestCachingTokenFilter.cs
+++ b/src/Lucene.Net.Tests/core/Analysis/TestCachingTokenFilter.cs
@@ -42,7 +42,7 @@ namespace Lucene.Net.Analysis
         public virtual void TestCaching()
         {
             Directory dir = new RAMDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             TokenStream stream = new TokenStreamAnonymousInnerClassHelper(this);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
index 322977a..e2ffe7d 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Compressing/TestCompressingTermVectorsFormat.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Codecs.Compressing
         public virtual void TestNoOrds()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
             ft.StoreTermVectors = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Document/TestBinaryDocument.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Document/TestBinaryDocument.cs b/src/Lucene.Net.Tests/core/Document/TestBinaryDocument.cs
index 74d3e93..1e010f8 100644
--- a/src/Lucene.Net.Tests/core/Document/TestBinaryDocument.cs
+++ b/src/Lucene.Net.Tests/core/Document/TestBinaryDocument.cs
@@ -98,7 +98,7 @@ namespace Lucene.Net.Document
             var doc = new Documents.Document {binaryFldCompressed, stringFldCompressed};
 
             using (Directory dir = NewDirectory())
-            using (RandomIndexWriter writer = new RandomIndexWriter(Random(), dir))
+            using (RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone))
             {
                 writer.AddDocument(doc);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Document/TestDocument.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Document/TestDocument.cs b/src/Lucene.Net.Tests/core/Document/TestDocument.cs
index 8d31bfc..cc35b32 100644
--- a/src/Lucene.Net.Tests/core/Document/TestDocument.cs
+++ b/src/Lucene.Net.Tests/core/Document/TestDocument.cs
@@ -190,7 +190,7 @@ namespace Lucene.Net.Document
         public virtual void TestGetValuesForIndexedDocument()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.AddDocument(MakeDocumentWithFields());
             IndexReader reader = writer.Reader;
 
@@ -223,7 +223,7 @@ namespace Lucene.Net.Document
         public virtual void TestPositionIncrementMultiFields()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.AddDocument(MakeDocumentWithFields());
             IndexReader reader = writer.Reader;
 
@@ -303,7 +303,7 @@ namespace Lucene.Net.Document
             doc.Add(new StringField("keyword", "test", Field.Store.YES));
 
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.AddDocument(doc);
             field.StringValue = "id2";
             writer.AddDocument(doc);
@@ -366,7 +366,7 @@ namespace Lucene.Net.Document
         public virtual void TestTransitionAPI()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Documents.Document doc = new Documents.Document();
             doc.Add(new Field("stored", "abc", Field.Store.YES, Field.Index.NO));
@@ -443,7 +443,7 @@ namespace Lucene.Net.Document
             Assert.AreEqual(new string[] { "5", "4" }, doc.GetValues("int"));
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             iw.AddDocument(doc);
             DirectoryReader ir = iw.Reader;
             Documents.Document sdoc = ir.Document(0);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs b/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
index b00230f..ef7fa5a 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBinaryTerms.cs
@@ -43,7 +43,7 @@ namespace Lucene.Net.Index
         public virtual void TestBinary()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             BytesRef bytes = new BytesRef(2);
             BinaryTokenStream tokenStream = new BinaryTokenStream(bytes);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestCompoundFile.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestCompoundFile.cs b/src/Lucene.Net.Tests/core/Index/TestCompoundFile.cs
index 87a36cf..e43aae9 100644
--- a/src/Lucene.Net.Tests/core/Index/TestCompoundFile.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestCompoundFile.cs
@@ -850,7 +850,7 @@ namespace Lucene.Net.Index
         {
             Directory dir = NewDirectory();
             // riw should sometimes create docvalues fields, etc
-            RandomIndexWriter riw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter riw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             // these fields should sometimes get term vectors, etc
             Field idField = NewStringField("id", "", Field.Store.NO);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs b/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
index a3d0c49..3646aef 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDirectoryReader.cs
@@ -1206,7 +1206,7 @@ namespace Lucene.Net.Index
         public virtual void TestLoadCertainFields()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(NewStringField("field1", "foobar", Field.Store.YES));
             doc.Add(NewStringField("field2", "foobaz", Field.Store.YES));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocCount.cs b/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
index 113088c..11165b2 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocCount.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Index
         public virtual void TestSimple()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int numDocs = AtLeast(100);
             for (int i = 0; i < numDocs; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestDocsAndPositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestDocsAndPositions.cs b/src/Lucene.Net.Tests/core/Index/TestDocsAndPositions.cs
index a9873a3..1a11039 100644
--- a/src/Lucene.Net.Tests/core/Index/TestDocsAndPositions.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestDocsAndPositions.cs
@@ -377,7 +377,7 @@ namespace Lucene.Net.Index
         public virtual void TestDocsEnumStart()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(NewStringField("foo", "bar", Field.Store.NO));
             writer.AddDocument(doc);
@@ -404,7 +404,7 @@ namespace Lucene.Net.Index
         public virtual void TestDocsAndPositionsEnumStart()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(NewTextField("foo", "bar", Field.Store.NO));
             writer.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
index 48332ac..d1fe9dd 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
@@ -1986,7 +1986,7 @@ namespace Lucene.Net.Index
             Field contentField = new Field("content", "", customType);
             doc.Add(contentField);
 
-            w = new RandomIndexWriter(Random(), dir);
+            w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             contentField.StringValue = "other";
             w.AddDocument(doc);
@@ -2854,7 +2854,7 @@ namespace Lucene.Net.Index
                 dir.DeleteFile(fileName);
             }
 
-            w = new RandomIndexWriter(Random(), dir);
+            w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             w.AddDocument(doc);
             w.Dispose();
             r.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestIndexWriterDelete.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterDelete.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterDelete.cs
index 3d321d3..cb85a55 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterDelete.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterDelete.cs
@@ -332,7 +332,7 @@ namespace Lucene.Net.Index
         public virtual void TestDeleteAllNoDeadLock()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter modifier = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter modifier = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int numThreads = AtLeast(2);
             ThreadClass[] threads = new ThreadClass[numThreads];
             CountdownEvent latch = new CountdownEvent(1);
@@ -1106,7 +1106,7 @@ namespace Lucene.Net.Index
         public virtual void TestDeleteAllSlowly()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int NUM_DOCS = AtLeast(1000);
             IList<int?> ids = new List<int?>(NUM_DOCS);
             for (int id = 0; id < NUM_DOCS; id++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
index 6821109..d732cc5 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterExceptions.cs
@@ -1720,7 +1720,7 @@ namespace Lucene.Net.Index
         public virtual void TestAddDocsNonAbortingException()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int numDocs1 = Random().Next(25);
             for (int docCount = 0; docCount < numDocs1; docCount++)
             {
@@ -1786,7 +1786,7 @@ namespace Lucene.Net.Index
         public virtual void TestUpdateDocsNonAbortingException()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int numDocs1 = Random().Next(25);
             for (int docCount = 0; docCount < numDocs1; docCount++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs b/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
index d4afb52..8059126 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
@@ -232,7 +232,7 @@ namespace Lucene.Net.Index
         public virtual void TestArbitraryFields()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             int NUM_DOCS = AtLeast(27);
             if (VERBOSE)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestIsCurrent.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIsCurrent.cs b/src/Lucene.Net.Tests/core/Index/TestIsCurrent.cs
index 78efb07..b8e0a7e 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIsCurrent.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIsCurrent.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Index
 
             // initialize directory
             Directory = NewDirectory();
-            Writer = new RandomIndexWriter(Random(), Directory);
+            Writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             // write document
             Document doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestOmitPositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestOmitPositions.cs b/src/Lucene.Net.Tests/core/Index/TestOmitPositions.cs
index 527e207..264f811 100644
--- a/src/Lucene.Net.Tests/core/Index/TestOmitPositions.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestOmitPositions.cs
@@ -45,7 +45,7 @@ namespace Lucene.Net.Index
         public virtual void TestBasic()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
             ft.IndexOptions = FieldInfo.IndexOptions.DOCS_AND_FREQS;
@@ -254,7 +254,7 @@ namespace Lucene.Net.Index
             ft.IndexOptions = FieldInfo.IndexOptions.DOCS_AND_FREQS;
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             for (int i = 0; i < 20; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestPayloads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPayloads.cs b/src/Lucene.Net.Tests/core/Index/TestPayloads.cs
index ce1168a..ed80cc3 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPayloads.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPayloads.cs
@@ -696,7 +696,7 @@ namespace Lucene.Net.Index
         public virtual void TestMixupMultiValued()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             Field field = new TextField("field", "", Field.Store.NO);
             TokenStream ts = new MockTokenizer(new StringReader("here we go"), MockTokenizer.WHITESPACE, true);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs b/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
index b95a5fe..d2f6380 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPayloadsOnVectors.cs
@@ -95,7 +95,7 @@ namespace Lucene.Net.Index
         public virtual void TestMixupMultiValued()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
             customType.StoreTermVectors = true;
@@ -138,7 +138,7 @@ namespace Lucene.Net.Index
         public virtual void TestPayloadsWithoutPositions()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
             customType.StoreTermVectors = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs b/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
index c1e355a..9aa4dfa 100644
--- a/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestPostingsOffsets.cs
@@ -438,7 +438,7 @@ namespace Lucene.Net.Index
         public virtual void TestAddFieldTwice()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType customType3 = new FieldType(TextField.TYPE_STORED);
             customType3.StoreTermVectors = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestRollback.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestRollback.cs b/src/Lucene.Net.Tests/core/Index/TestRollback.cs
index 42bd03c..d7f0e86 100644
--- a/src/Lucene.Net.Tests/core/Index/TestRollback.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestRollback.cs
@@ -36,7 +36,7 @@ namespace Lucene.Net.Index
         public virtual void TestRollbackIntegrityWithBufferFlush()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter rw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter rw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < 5; i++)
             {
                 Document doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestSameTokenSamePosition.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestSameTokenSamePosition.cs b/src/Lucene.Net.Tests/core/Index/TestSameTokenSamePosition.cs
index c68abf1..ee7e0a8 100644
--- a/src/Lucene.Net.Tests/core/Index/TestSameTokenSamePosition.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestSameTokenSamePosition.cs
@@ -39,7 +39,7 @@ namespace Lucene.Net.Index
         public virtual void Test()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter riw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter riw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(new TextField("eng", new BugReproTokenStream()));
             riw.AddDocument(doc);
@@ -54,7 +54,7 @@ namespace Lucene.Net.Index
         public virtual void TestMoreDocs()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter riw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter riw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < 100; i++)
             {
                 Document doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestStressAdvance.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestStressAdvance.cs b/src/Lucene.Net.Tests/core/Index/TestStressAdvance.cs
index 9f88a40..4e8cefb 100644
--- a/src/Lucene.Net.Tests/core/Index/TestStressAdvance.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestStressAdvance.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Index
                     Console.WriteLine("\nTEST: iter=" + iter);
                 }
                 Directory dir = NewDirectory();
-                RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+                RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
                 HashSet<int> aDocs = new HashSet<int>();
                 Documents.Document doc = new Documents.Document();
                 Field f = NewStringField("field", "", Field.Store.NO);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestSumDocFreq.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestSumDocFreq.cs b/src/Lucene.Net.Tests/core/Index/TestSumDocFreq.cs
index eb923a2..73cc3c4 100644
--- a/src/Lucene.Net.Tests/core/Index/TestSumDocFreq.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestSumDocFreq.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Index
             int numDocs = AtLeast(500);
 
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             Field id = NewStringField("id", "", Field.Store.NO);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs b/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
index 7765c6c..86937a3 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermVectorsReader.cs
@@ -410,7 +410,7 @@ namespace Lucene.Net.Index
         public virtual void TestIllegalIndexableField()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
             ft.StoreTermVectors = true;
             ft.StoreTermVectorPayloads = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs b/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
index d961d64..f175d90 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermsEnum.cs
@@ -230,7 +230,7 @@ namespace Lucene.Net.Index
         public virtual void TestIntersectRandom()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             int numTerms = AtLeast(300);
             //final int numTerms = 50;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarity2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarity2.cs b/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarity2.cs
index fc6a434..27e58b2 100644
--- a/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarity2.cs
+++ b/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarity2.cs
@@ -84,7 +84,7 @@ namespace Lucene.Net.Search.Similarities
         public virtual void TestEmptyIndex()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             IndexReader ir = iw.Reader;
             iw.Dispose();
             IndexSearcher @is = NewSearcher(ir);
@@ -104,7 +104,7 @@ namespace Lucene.Net.Search.Similarities
         public virtual void TestEmptyField()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(NewTextField("foo", "bar", Field.Store.NO));
             iw.AddDocument(doc);
@@ -130,7 +130,7 @@ namespace Lucene.Net.Search.Similarities
         public virtual void TestEmptyTerm()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(NewTextField("foo", "bar", Field.Store.NO));
             iw.AddDocument(doc);
@@ -156,7 +156,7 @@ namespace Lucene.Net.Search.Similarities
         public virtual void TestNoNorms()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
             ft.OmitNorms = true;
@@ -184,7 +184,7 @@ namespace Lucene.Net.Search.Similarities
         public virtual void TestOmitTF()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
             ft.IndexOptions = FieldInfo.IndexOptions.DOCS_ONLY;
@@ -213,7 +213,7 @@ namespace Lucene.Net.Search.Similarities
         public virtual void TestOmitTFAndNorms()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
             ft.IndexOptions = FieldInfo.IndexOptions.DOCS_ONLY;
@@ -247,7 +247,7 @@ namespace Lucene.Net.Search.Similarities
             // however with spans, there is only one scorer for the whole hierarchy:
             // inner queries are not real queries, their boosts are ignored, etc.
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             FieldType ft = new FieldType(TextField.TYPE_NOT_STORED);
             doc.Add(NewField("foo", "bar", ft));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarityBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarityBase.cs b/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarityBase.cs
index a04f946..2b2c7ab 100644
--- a/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarityBase.cs
+++ b/src/Lucene.Net.Tests/core/Search/Similarities/TestSimilarityBase.cs
@@ -106,7 +106,7 @@ namespace Lucene.Net.Search.Similarities
             base.SetUp();
 
             Dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             for (int i = 0; i < Docs.Length; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/Spans/TestSpanMultiTermQueryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanMultiTermQueryWrapper.cs b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanMultiTermQueryWrapper.cs
index 87569cc..364b2e7 100644
--- a/src/Lucene.Net.Tests/core/Search/Spans/TestSpanMultiTermQueryWrapper.cs
+++ b/src/Lucene.Net.Tests/core/Search/Spans/TestSpanMultiTermQueryWrapper.cs
@@ -44,7 +44,7 @@ namespace Lucene.Net.Search.Spans
         {
             base.SetUp();
             Directory = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), Directory);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             Field field = NewTextField("field", "", Field.Store.NO);
             doc.Add(field);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs b/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
index 87db2cd..370bb9f 100644
--- a/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
@@ -55,7 +55,7 @@ namespace Lucene.Net.Search
         {
             base.SetUp();
             Directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             Field titleField = NewTextField("title", "some title", Field.Store.NO);
             Field field = NewTextField(FN, "this is document one 2345", Field.Store.NO);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestAutomatonQueryUnicode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestAutomatonQueryUnicode.cs b/src/Lucene.Net.Tests/core/Search/TestAutomatonQueryUnicode.cs
index 581016e..56b4df1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestAutomatonQueryUnicode.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestAutomatonQueryUnicode.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Search
         {
             base.SetUp();
             Directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             Field titleField = NewTextField("title", "some title", Field.Store.NO);
             Field field = NewTextField(FN, "", Field.Store.NO);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs b/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
index 778bb1b..ede9299 100644
--- a/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestBooleanOr.cs
@@ -145,7 +145,7 @@ namespace Lucene.Net.Search
             Dir = NewDirectory();
 
             //
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             //
             Document d = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestBooleanQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestBooleanQuery.cs b/src/Lucene.Net.Tests/core/Search/TestBooleanQuery.cs
index cc42669..f3288c2 100644
--- a/src/Lucene.Net.Tests/core/Search/TestBooleanQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestBooleanQuery.cs
@@ -86,7 +86,7 @@ namespace Lucene.Net.Search
         public virtual void TestNullOrSubScorer()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(NewTextField("field", "a b c d", Field.Store.NO));
             w.AddDocument(doc);
@@ -369,7 +369,7 @@ namespace Lucene.Net.Search
         public virtual void TestInOrderWithMinShouldMatch()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(NewTextField("field", "some text here", Field.Store.NO));
             w.AddDocument(doc);


Mime
View raw message