lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [07/32] lucenenet git commit: Fixing build errors from adding extra params to RandomIndexWriter
Date Fri, 12 Aug 2016 13:25:20 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestBooleanScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestBooleanScorer.cs b/src/Lucene.Net.Tests/core/Search/TestBooleanScorer.cs
index 592048c..0e6915a 100644
--- a/src/Lucene.Net.Tests/core/Search/TestBooleanScorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestBooleanScorer.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Search
 
             string[] values = new string[] { "1", "2", "3", "4" };
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < values.Length; i++)
             {
                 Document doc = new Document();
@@ -83,7 +83,7 @@ namespace Lucene.Net.Search
             // changes, we have a test to back it up.
 
             Directory directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.Commit();
             IndexReader ir = writer.Reader;
             writer.Dispose();
@@ -321,7 +321,7 @@ namespace Lucene.Net.Search
         public virtual void TestEmbeddedBooleanScorer()
         {
             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", "doctors are people who prescribe medicines of which they know little, to cure diseases of which they know less, in human beings of whom they know nothing", Field.Store.NO));
             w.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs b/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
index 393ddab..180d890 100644
--- a/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestCachingWrapperFilter.cs
@@ -53,7 +53,7 @@ namespace Lucene.Net.Search
         {
             base.SetUp();
             Dir = NewDirectory();
-            Iw = new RandomIndexWriter(Random(), Dir);
+            Iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             Field idField = new StringField("id", "", Field.Store.NO);
             doc.Add(idField);
@@ -173,7 +173,7 @@ namespace Lucene.Net.Search
         public virtual void TestCachingWorks()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.Dispose();
 
             IndexReader reader = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(dir));
@@ -201,7 +201,7 @@ namespace Lucene.Net.Search
         public virtual void TestNullDocIdSet()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.Dispose();
 
             IndexReader reader = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(dir));
@@ -240,7 +240,7 @@ namespace Lucene.Net.Search
         public virtual void TestNullDocIdSetIterator()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.Dispose();
 
             IndexReader reader = SlowCompositeReaderWrapper.Wrap(DirectoryReader.Open(dir));
@@ -324,7 +324,7 @@ namespace Lucene.Net.Search
         public virtual void TestIsCacheAble()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.AddDocument(new Document());
             writer.Dispose();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestConstantScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestConstantScoreQuery.cs b/src/Lucene.Net.Tests/core/Search/TestConstantScoreQuery.cs
index d95f108..5097f22 100644
--- a/src/Lucene.Net.Tests/core/Search/TestConstantScoreQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestConstantScoreQuery.cs
@@ -125,7 +125,7 @@ namespace Lucene.Net.Search
             try
             {
                 directory = NewDirectory();
-                RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+                RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
                 Document doc = new Document();
                 doc.Add(NewStringField("field", "term", Field.Store.NO));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestDateSort.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestDateSort.cs b/src/Lucene.Net.Tests/core/Search/TestDateSort.cs
index b92cdf3..122c9f1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestDateSort.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestDateSort.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Search
             base.SetUp();
             // Create an index writer.
             Directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             // oldest doc:
             // Add the first document.  text = "Document 1"  dateTime = Oct 10 03:25:22 EDT 2007

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestDocIdSet.cs b/src/Lucene.Net.Tests/core/Search/TestDocIdSet.cs
index 1caf080..a4a1569 100644
--- a/src/Lucene.Net.Tests/core/Search/TestDocIdSet.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestDocIdSet.cs
@@ -147,7 +147,7 @@ namespace Lucene.Net.Search
             // Tests that if a Filter produces a null DocIdSet, which is given to
             // IndexSearcher, everything works fine. this came up in LUCENE-1754.
             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("c", "val", Field.Store.NO));
             writer.AddDocument(doc);
@@ -185,7 +185,7 @@ namespace Lucene.Net.Search
         public virtual void TestNullIteratorFilteredDocIdSet()
         {
             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("c", "val", Field.Store.NO));
             writer.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs b/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
index 8c9eae4..b7708c3 100644
--- a/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestDocValuesScoring.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Search
         public virtual void TestSimple()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             Field field = NewTextField("foo", "", Field.Store.NO);
             doc.Add(field);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestEarlyTermination.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestEarlyTermination.cs b/src/Lucene.Net.Tests/core/Search/TestEarlyTermination.cs
index 5eca218..e59f004 100644
--- a/src/Lucene.Net.Tests/core/Search/TestEarlyTermination.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestEarlyTermination.cs
@@ -38,7 +38,7 @@ namespace Lucene.Net.Search
         {
             base.SetUp();
             Dir = NewDirectory();
-            Writer = new RandomIndexWriter(Random(), Dir);
+            Writer = 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/Search/TestFuzzyQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs b/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs
index e924529..f6e5977 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs
@@ -46,7 +46,7 @@ namespace Lucene.Net.Search
         public virtual void TestFuzziness()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             AddDoc("aaaaa", writer);
             AddDoc("aaaab", writer);
             AddDoc("aaabb", writer);
@@ -244,7 +244,7 @@ namespace Lucene.Net.Search
         public virtual void TestTieBreaker()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             AddDoc("a123456", writer);
             AddDoc("c123456", writer);
             AddDoc("d123456", writer);
@@ -282,7 +282,7 @@ namespace Lucene.Net.Search
         public virtual void TestBoostOnlyRewrite()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             AddDoc("Lucene", writer);
             AddDoc("Lucene", writer);
             AddDoc("Lucenne", writer);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs b/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
index b14ccb3..f16306d 100644
--- a/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestIndexSearcher.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Search
         {
             base.SetUp();
             Dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), Dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < 100; i++)
             {
                 Document doc = new Document();
@@ -117,7 +117,7 @@ namespace Lucene.Net.Search
         {
             // LUCENE-5128: ensure we get a meaningful message if searchAfter exceeds maxDoc
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             w.AddDocument(new Document());
             IndexReader r = w.Reader;
             w.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs b/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
index 8ea7fc5..312bc2a 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMinShouldMatch2.cs
@@ -64,7 +64,7 @@ namespace Lucene.Net.Search
         public static void BeforeClass()
         {
             Dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), Dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int numDocs = AtLeast(300);
             for (int i = 0; i < numDocs; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestMultiPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestMultiPhraseQuery.cs b/src/Lucene.Net.Tests/core/Search/TestMultiPhraseQuery.cs
index 587adca..82f15e6 100644
--- a/src/Lucene.Net.Tests/core/Search/TestMultiPhraseQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestMultiPhraseQuery.cs
@@ -408,7 +408,7 @@ namespace Lucene.Net.Search
             tokens[2].Append("c");
             tokens[2].PositionIncrement = 0;
 
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             Document doc = new Document();
             doc.Add(new TextField("field", new CannedTokenStream(tokens)));
             writer.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestNGramPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestNGramPhraseQuery.cs b/src/Lucene.Net.Tests/core/Search/TestNGramPhraseQuery.cs
index 548e64e..c7f05e5 100644
--- a/src/Lucene.Net.Tests/core/Search/TestNGramPhraseQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestNGramPhraseQuery.cs
@@ -36,7 +36,7 @@ namespace Lucene.Net.Search
         public static void BeforeClass()
         {
             Directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.Dispose();
             Reader = DirectoryReader.Open(Directory);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestPhraseQuery.cs b/src/Lucene.Net.Tests/core/Search/TestPhraseQuery.cs
index de56994..014b3ab 100644
--- a/src/Lucene.Net.Tests/core/Search/TestPhraseQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestPhraseQuery.cs
@@ -265,7 +265,7 @@ namespace Lucene.Net.Search
         public virtual void TestPhraseQueryInConjunctionScorer()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Documents.Document doc = new Documents.Document();
             doc.Add(NewTextField("source", "marketing info", Field.Store.YES));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestPositiveScoresOnlyCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestPositiveScoresOnlyCollector.cs b/src/Lucene.Net.Tests/core/Search/TestPositiveScoresOnlyCollector.cs
index 44ce0ab..f3461ea 100644
--- a/src/Lucene.Net.Tests/core/Search/TestPositiveScoresOnlyCollector.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestPositiveScoresOnlyCollector.cs
@@ -90,7 +90,7 @@ namespace Lucene.Net.Search
             }
 
             Directory directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.Commit();
             IndexReader ir = writer.Reader;
             writer.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestPrefixFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestPrefixFilter.cs b/src/Lucene.Net.Tests/core/Search/TestPrefixFilter.cs
index 87773f9..6e33a0b 100644
--- a/src/Lucene.Net.Tests/core/Search/TestPrefixFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestPrefixFilter.cs
@@ -42,7 +42,7 @@ namespace Lucene.Net.Search
             Directory directory = NewDirectory();
 
             string[] categories = new string[] { "/Computers/Linux", "/Computers/Mac/One", "/Computers/Mac/Two", "/Computers/Windows" };
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < categories.Length; i++)
             {
                 Document doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestPrefixInBooleanQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestPrefixInBooleanQuery.cs b/src/Lucene.Net.Tests/core/Search/TestPrefixInBooleanQuery.cs
index a4b7b55..d1b0c90 100644
--- a/src/Lucene.Net.Tests/core/Search/TestPrefixInBooleanQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestPrefixInBooleanQuery.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Search
         public static void BeforeClass()
         {
             Directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             Field field = NewStringField(FIELD, "meaninglessnames", Field.Store.NO);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestPrefixQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestPrefixQuery.cs b/src/Lucene.Net.Tests/core/Search/TestPrefixQuery.cs
index b1e4c16..fd5b85a 100644
--- a/src/Lucene.Net.Tests/core/Search/TestPrefixQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestPrefixQuery.cs
@@ -44,7 +44,7 @@ namespace Lucene.Net.Search
             Directory directory = NewDirectory();
 
             string[] categories = new string[] { "/Computers", "/Computers/Mac", "/Computers/Windows" };
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < categories.Length; i++)
             {
                 Document doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs b/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
index 235ff28..b9ab94b 100644
--- a/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestQueryRescorer.cs
@@ -61,7 +61,7 @@ namespace Lucene.Net.Search
         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();
             doc.Add(NewStringField("id", "0", Field.Store.YES));
@@ -120,7 +120,7 @@ namespace Lucene.Net.Search
         public virtual void TestCustomCombine()
         {
             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(NewStringField("id", "0", Field.Store.YES));
@@ -189,7 +189,7 @@ namespace Lucene.Net.Search
         public virtual void TestExplain()
         {
             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(NewStringField("id", "0", Field.Store.YES));
@@ -277,7 +277,7 @@ namespace Lucene.Net.Search
         public virtual void TestMissingSecondPassScore()
         {
             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(NewStringField("id", "0", Field.Store.YES));
@@ -335,7 +335,7 @@ namespace Lucene.Net.Search
         {
             Directory dir = NewDirectory();
             int numDocs = AtLeast(1000);
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             int[] idToNum = new int[numDocs];
             int maxValue = TestUtil.NextInt(Random(), 10, 1000000);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestQueryWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestQueryWrapperFilter.cs b/src/Lucene.Net.Tests/core/Search/TestQueryWrapperFilter.cs
index adbdff4..1de5e61 100644
--- a/src/Lucene.Net.Tests/core/Search/TestQueryWrapperFilter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestQueryWrapperFilter.cs
@@ -39,7 +39,7 @@ namespace Lucene.Net.Search
         public virtual void TestBasic()
         {
             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("field", "value", Field.Store.NO));
             writer.AddDocument(doc);
@@ -139,7 +139,7 @@ namespace Lucene.Net.Search
         public virtual void TestThousandDocuments()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < 1000; i++)
             {
                 Document doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestRegexpQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestRegexpQuery.cs b/src/Lucene.Net.Tests/core/Search/TestRegexpQuery.cs
index d4811c0..fc7ebcc 100644
--- a/src/Lucene.Net.Tests/core/Search/TestRegexpQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestRegexpQuery.cs
@@ -51,7 +51,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();
             doc.Add(NewTextField(FN, "the quick brown fox jumps over the lazy ??? dog 493432 49344", Field.Store.NO));
             writer.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestScoreCachingWrappingScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestScoreCachingWrappingScorer.cs b/src/Lucene.Net.Tests/core/Search/TestScoreCachingWrappingScorer.cs
index 17c6450..42cef6e 100644
--- a/src/Lucene.Net.Tests/core/Search/TestScoreCachingWrappingScorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestScoreCachingWrappingScorer.cs
@@ -128,7 +128,7 @@ namespace Lucene.Net.Search
         public virtual void TestGetScores()
         {
             Directory directory = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), directory, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             writer.Commit();
             IndexReader ir = writer.Reader;
             writer.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs b/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
index c11c9f6..e76a79d 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearchAfter.cs
@@ -121,7 +121,7 @@ namespace Lucene.Net.Search
             }
 
             Dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), Dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             int numDocs = AtLeast(200);
             for (int i = 0; i < numDocs; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs b/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
index c4d033a..ed6f1df 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearchWithThreads.cs
@@ -52,7 +52,7 @@ namespace Lucene.Net.Search
         public virtual void Test()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             long startTime = Environment.TickCount;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs b/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
index a175d0f..97c862c 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSearcherManager.cs
@@ -581,7 +581,7 @@ namespace Lucene.Net.Search
             // make sure that maybeRefreshBlocking releases the lock, otherwise other
             // threads cannot obtain it.
             Directory dir = NewDirectory();
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             w.Dispose();
 
             SearcherManager sm = new SearcherManager(dir, null);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestSloppyPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSloppyPhraseQuery.cs b/src/Lucene.Net.Tests/core/Search/TestSloppyPhraseQuery.cs
index f566da9..5cf923c 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSloppyPhraseQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSloppyPhraseQuery.cs
@@ -290,7 +290,7 @@ namespace Lucene.Net.Search
         public virtual void TestSlopWithHoles()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             FieldType customType = new FieldType(TextField.TYPE_NOT_STORED);
             customType.OmitNorms = true;
             Field f = new Field("lyrics", "", customType);
@@ -329,7 +329,7 @@ namespace Lucene.Net.Search
             string document = "drug druggy drug drug drug";
 
             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(NewField("lyrics", document, new FieldType(TextField.TYPE_NOT_STORED)));
             iw.AddDocument(doc);
@@ -355,7 +355,7 @@ namespace Lucene.Net.Search
 
             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(NewField("lyrics", document, new FieldType(TextField.TYPE_NOT_STORED)));
             iw.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestSort.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSort.cs b/src/Lucene.Net.Tests/core/Search/TestSort.cs
index 57b4f82..29991d1 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSort.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSort.cs
@@ -69,7 +69,7 @@ namespace Lucene.Net.Search
         public virtual void TestString()
         {
             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("value", "foo", Field.Store.YES));
             writer.AddDocument(doc);
@@ -98,7 +98,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringMissing()
         {
             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);
             doc = new Document();
@@ -130,7 +130,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringReverse()
         {
             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("value", "bar", Field.Store.YES));
             writer.AddDocument(doc);
@@ -159,7 +159,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringVal()
         {
             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("value", "foo", Field.Store.YES));
             writer.AddDocument(doc);
@@ -188,7 +188,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringValMissing()
         {
             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);
             doc = new Document();
@@ -222,7 +222,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringMissingSortedFirst()
         {
             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);
             doc = new Document();
@@ -257,7 +257,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringMissingSortedFirstReverse()
         {
             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);
             doc = new Document();
@@ -292,7 +292,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringValMissingSortedLast()
         {
             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);
             doc = new Document();
@@ -328,7 +328,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringValMissingSortedLastReverse()
         {
             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);
             doc = new Document();
@@ -362,7 +362,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringValReverse()
         {
             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("value", "bar", Field.Store.YES));
             writer.AddDocument(doc);
@@ -391,7 +391,7 @@ namespace Lucene.Net.Search
         public virtual void TestFieldDoc()
         {
             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("value", "foo", Field.Store.NO));
             writer.AddDocument(doc);
@@ -420,7 +420,7 @@ namespace Lucene.Net.Search
         public virtual void TestFieldDocReverse()
         {
             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("value", "foo", Field.Store.NO));
             writer.AddDocument(doc);
@@ -449,7 +449,7 @@ namespace Lucene.Net.Search
         public virtual void TestFieldScore()
         {
             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("value", "foo bar bar bar bar", Field.Store.NO));
             writer.AddDocument(doc);
@@ -483,7 +483,7 @@ namespace Lucene.Net.Search
         public virtual void TestFieldScoreReverse()
         {
             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("value", "foo bar bar bar bar", Field.Store.NO));
             writer.AddDocument(doc);
@@ -515,7 +515,7 @@ namespace Lucene.Net.Search
         public virtual void TestByte()
         {
             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("value", "23", Field.Store.YES));
             writer.AddDocument(doc);
@@ -548,7 +548,7 @@ namespace Lucene.Net.Search
         public virtual void TestByteMissing()
         {
             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);
             doc = new Document();
@@ -580,7 +580,7 @@ namespace Lucene.Net.Search
         public virtual void TestByteMissingLast()
         {
             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);
             doc = new Document();
@@ -614,7 +614,7 @@ namespace Lucene.Net.Search
         public virtual void TestByteReverse()
         {
             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("value", "23", Field.Store.YES));
             writer.AddDocument(doc);
@@ -647,7 +647,7 @@ namespace Lucene.Net.Search
         public virtual void TestShort()
         {
             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("value", "300", Field.Store.YES));
             writer.AddDocument(doc);
@@ -680,7 +680,7 @@ namespace Lucene.Net.Search
         public virtual void TestShortMissing()
         {
             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);
             doc = new Document();
@@ -712,7 +712,7 @@ namespace Lucene.Net.Search
         public virtual void TestShortMissingLast()
         {
             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);
             doc = new Document();
@@ -746,7 +746,7 @@ namespace Lucene.Net.Search
         public virtual void TestShortReverse()
         {
             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("value", "300", Field.Store.YES));
             writer.AddDocument(doc);
@@ -779,7 +779,7 @@ namespace Lucene.Net.Search
         public virtual void TestInt()
         {
             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("value", "300000", Field.Store.YES));
             writer.AddDocument(doc);
@@ -812,7 +812,7 @@ namespace Lucene.Net.Search
         public virtual void TestIntMissing()
         {
             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);
             doc = new Document();
@@ -844,7 +844,7 @@ namespace Lucene.Net.Search
         public virtual void TestIntMissingLast()
         {
             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);
             doc = new Document();
@@ -878,7 +878,7 @@ namespace Lucene.Net.Search
         public virtual void TestIntReverse()
         {
             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("value", "300000", Field.Store.YES));
             writer.AddDocument(doc);
@@ -911,7 +911,7 @@ namespace Lucene.Net.Search
         public virtual void TestLong()
         {
             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("value", "3000000000", Field.Store.YES));
             writer.AddDocument(doc);
@@ -944,7 +944,7 @@ namespace Lucene.Net.Search
         public virtual void TestLongMissing()
         {
             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);
             doc = new Document();
@@ -976,7 +976,7 @@ namespace Lucene.Net.Search
         public virtual void TestLongMissingLast()
         {
             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);
             doc = new Document();
@@ -1010,7 +1010,7 @@ namespace Lucene.Net.Search
         public virtual void TestLongReverse()
         {
             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("value", "3000000000", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1043,7 +1043,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloat()
         {
             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("value", "30.1", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1076,7 +1076,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloatMissing()
         {
             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);
             doc = new Document();
@@ -1108,7 +1108,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloatMissingLast()
         {
             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);
             doc = new Document();
@@ -1142,7 +1142,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloatReverse()
         {
             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("value", "30.1", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1175,7 +1175,7 @@ namespace Lucene.Net.Search
         public virtual void TestDouble()
         {
             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("value", "30.1", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1212,7 +1212,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleSignedZero()
         {
             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("value", "+0", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1242,7 +1242,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleMissing()
         {
             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);
             doc = new Document();
@@ -1278,7 +1278,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleMissingLast()
         {
             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);
             doc = new Document();
@@ -1316,7 +1316,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleReverse()
         {
             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("value", "30.1", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1480,7 +1480,7 @@ namespace Lucene.Net.Search
             letters = (List<string>)CollectionsHelper.Shuffle(letters);
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             foreach (string letter in letters)
             {
                 Document doc = new Document();
@@ -1537,7 +1537,7 @@ namespace Lucene.Net.Search
             letters = (List<string>)CollectionsHelper.Shuffle(letters);
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             foreach (string letter in letters)
             {
                 Document doc = new Document();
@@ -1595,7 +1595,7 @@ namespace Lucene.Net.Search
             letters = (List<string>)CollectionsHelper.Shuffle(letters);
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             foreach (string letter in letters)
             {
                 Document doc = new Document();
@@ -1652,7 +1652,7 @@ namespace Lucene.Net.Search
             letters = (List<string>)CollectionsHelper.Shuffle(letters);
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             foreach (string letter in letters)
             {
                 Document doc = new Document();
@@ -1709,7 +1709,7 @@ namespace Lucene.Net.Search
             letters = (List<string>)CollectionsHelper.Shuffle(letters);
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             foreach (string letter in letters)
             {
                 Document doc = new Document();
@@ -1767,7 +1767,7 @@ namespace Lucene.Net.Search
             letters = (List<string>)CollectionsHelper.Shuffle(letters);
 
             Directory dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             foreach (string letter in letters)
             {
                 Document doc = new Document();
@@ -1821,7 +1821,7 @@ namespace Lucene.Net.Search
         public virtual void TestSortOneDocument()
         {
             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("value", "foo", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1845,7 +1845,7 @@ namespace Lucene.Net.Search
         public virtual void TestSortOneDocumentWithScores()
         {
             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("value", "foo", Field.Store.YES));
             writer.AddDocument(doc);
@@ -1872,7 +1872,7 @@ namespace Lucene.Net.Search
         public virtual void TestSortTwoFields()
         {
             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("tievalue", "tied", Field.Store.NO));
             doc.Add(NewStringField("value", "foo", Field.Store.YES));
@@ -1902,7 +1902,7 @@ namespace Lucene.Net.Search
         public virtual void TestScore()
         {
             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("value", "bar", Field.Store.NO));
             writer.AddDocument(doc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs b/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
index eb4eb94..ae71595 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSortDocValues.cs
@@ -62,7 +62,7 @@ namespace Lucene.Net.Search
         public virtual void TestString()
         {
             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(new SortedDocValuesField("value", new BytesRef("foo")));
             doc.Add(NewStringField("value", "foo", Field.Store.YES));
@@ -94,7 +94,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringReverse()
         {
             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(new SortedDocValuesField("value", new BytesRef("bar")));
             doc.Add(NewStringField("value", "bar", Field.Store.YES));
@@ -126,7 +126,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringVal()
         {
             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(new BinaryDocValuesField("value", new BytesRef("foo")));
             doc.Add(NewStringField("value", "foo", Field.Store.YES));
@@ -158,7 +158,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringValReverse()
         {
             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(new BinaryDocValuesField("value", new BytesRef("bar")));
             doc.Add(NewStringField("value", "bar", Field.Store.YES));
@@ -190,7 +190,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringValSorted()
         {
             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(new SortedDocValuesField("value", new BytesRef("foo")));
             doc.Add(NewStringField("value", "foo", Field.Store.YES));
@@ -222,7 +222,7 @@ namespace Lucene.Net.Search
         public virtual void TestStringValReverseSorted()
         {
             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(new SortedDocValuesField("value", new BytesRef("bar")));
             doc.Add(NewStringField("value", "bar", Field.Store.YES));
@@ -254,7 +254,7 @@ namespace Lucene.Net.Search
         public virtual void TestByte()
         {
             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(new NumericDocValuesField("value", 23));
             doc.Add(NewStringField("value", "23", Field.Store.YES));
@@ -291,7 +291,7 @@ namespace Lucene.Net.Search
         public virtual void TestByteReverse()
         {
             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(new NumericDocValuesField("value", 23));
             doc.Add(NewStringField("value", "23", Field.Store.YES));
@@ -328,7 +328,7 @@ namespace Lucene.Net.Search
         public virtual void TestShort()
         {
             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(new NumericDocValuesField("value", 300));
             doc.Add(NewStringField("value", "300", Field.Store.YES));
@@ -365,7 +365,7 @@ namespace Lucene.Net.Search
         public virtual void TestShortReverse()
         {
             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(new NumericDocValuesField("value", 300));
             doc.Add(NewStringField("value", "300", Field.Store.YES));
@@ -402,7 +402,7 @@ namespace Lucene.Net.Search
         public virtual void TestInt()
         {
             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(new NumericDocValuesField("value", 300000));
             doc.Add(NewStringField("value", "300000", Field.Store.YES));
@@ -439,7 +439,7 @@ namespace Lucene.Net.Search
         public virtual void TestIntReverse()
         {
             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(new NumericDocValuesField("value", 300000));
             doc.Add(NewStringField("value", "300000", Field.Store.YES));
@@ -476,7 +476,7 @@ namespace Lucene.Net.Search
         public virtual void TestIntMissing()
         {
             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);
             doc = new Document();
@@ -510,7 +510,7 @@ namespace Lucene.Net.Search
         public virtual void TestIntMissingLast()
         {
             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);
             doc = new Document();
@@ -546,7 +546,7 @@ namespace Lucene.Net.Search
         public virtual void TestLong()
         {
             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(new NumericDocValuesField("value", 3000000000L));
             doc.Add(NewStringField("value", "3000000000", Field.Store.YES));
@@ -583,7 +583,7 @@ namespace Lucene.Net.Search
         public virtual void TestLongReverse()
         {
             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(new NumericDocValuesField("value", 3000000000L));
             doc.Add(NewStringField("value", "3000000000", Field.Store.YES));
@@ -620,7 +620,7 @@ namespace Lucene.Net.Search
         public virtual void TestLongMissing()
         {
             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);
             doc = new Document();
@@ -654,7 +654,7 @@ namespace Lucene.Net.Search
         public virtual void TestLongMissingLast()
         {
             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);
             doc = new Document();
@@ -690,7 +690,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloat()
         {
             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(new FloatDocValuesField("value", 30.1F));
             doc.Add(NewStringField("value", "30.1", Field.Store.YES));
@@ -727,7 +727,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloatReverse()
         {
             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(new FloatDocValuesField("value", 30.1F));
             doc.Add(NewStringField("value", "30.1", Field.Store.YES));
@@ -764,7 +764,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloatMissing()
         {
             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);
             doc = new Document();
@@ -798,7 +798,7 @@ namespace Lucene.Net.Search
         public virtual void TestFloatMissingLast()
         {
             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);
             doc = new Document();
@@ -834,7 +834,7 @@ namespace Lucene.Net.Search
         public virtual void TestDouble()
         {
             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(new DoubleDocValuesField("value", 30.1));
             doc.Add(NewStringField("value", "30.1", Field.Store.YES));
@@ -876,7 +876,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleSignedZero()
         {
             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(new DoubleDocValuesField("value", +0D));
             doc.Add(NewStringField("value", "+0", Field.Store.YES));
@@ -908,7 +908,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleReverse()
         {
             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(new DoubleDocValuesField("value", 30.1));
             doc.Add(NewStringField("value", "30.1", Field.Store.YES));
@@ -950,7 +950,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleMissing()
         {
             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);
             doc = new Document();
@@ -989,7 +989,7 @@ namespace Lucene.Net.Search
         public virtual void TestDoubleMissingLast()
         {
             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);
             doc = new Document();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs b/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
index a7a5673..e51f798 100644
--- a/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestSortRescorer.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Search
         {
             base.SetUp();
             Dir = NewDirectory();
-            RandomIndexWriter iw = new RandomIndexWriter(Random(), Dir);
+            RandomIndexWriter iw = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             Document doc = new Document();
             doc.Add(NewStringField("id", "1", Field.Store.YES));
@@ -121,7 +121,7 @@ namespace Lucene.Net.Search
         {
             Directory dir = NewDirectory();
             int numDocs = AtLeast(1000);
-            RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
 
             int[] idToNum = new int[numDocs];
             int maxValue = TestUtil.NextInt(Random(), 10, 1000000);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestTopDocsCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTopDocsCollector.cs b/src/Lucene.Net.Tests/core/Search/TestTopDocsCollector.cs
index d5097ec..c767ede 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTopDocsCollector.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTopDocsCollector.cs
@@ -117,7 +117,7 @@ namespace Lucene.Net.Search
             // populate an index with 30 documents, this should be enough for the test.
             // The documents have no content - the test uses MatchAllDocsQuery().
             Dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), Dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < 30; i++)
             {
                 writer.AddDocument(new Document());

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs b/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
index 63bbcf9..df1c4ce 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
@@ -99,7 +99,7 @@ namespace Lucene.Net.Search
 
             {
                 dir = NewDirectory();
-                RandomIndexWriter w = new RandomIndexWriter(Random(), dir);
+                RandomIndexWriter w = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
                 // w.setDoRandomForceMerge(false);
 
                 // w.w.getConfig().SetMaxBufferedDocs(AtLeast(100));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6f3e8079/src/Lucene.Net.Tests/core/Search/TestTopFieldCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTopFieldCollector.cs b/src/Lucene.Net.Tests/core/Search/TestTopFieldCollector.cs
index 4ec8488..d282f76 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTopFieldCollector.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTopFieldCollector.cs
@@ -39,7 +39,7 @@ namespace Lucene.Net.Search
         {
             base.SetUp();
             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/Search/TestTopScoreDocCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTopScoreDocCollector.cs b/src/Lucene.Net.Tests/core/Search/TestTopScoreDocCollector.cs
index 6733998..eb19642 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTopScoreDocCollector.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTopScoreDocCollector.cs
@@ -33,7 +33,7 @@ namespace Lucene.Net.Search
         public virtual void TestOutOfOrderCollection()
         {
             Directory dir = NewDirectory();
-            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir);
+            RandomIndexWriter writer = new RandomIndexWriter(Random(), dir, ClassEnvRule.Similarity, ClassEnvRule.TimeZone);
             for (int i = 0; i < 10; i++)
             {
                 writer.AddDocument(new Document());


Mime
View raw message