lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject [Lucene.Net] svn commit: r1203912 [1/2] - in /incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk: src/core/ src/core/Messages/ src/core/Search/ test/core/ test/core/Index/ test/core/Messages/ test/core/Search/
Date Sat, 19 Nov 2011 00:19:06 GMT
Author: ccurrens
Date: Sat Nov 19 00:19:05 2011
New Revision: 1203912

URL: http://svn.apache.org/viewvc?rev=1203912&view=rev
Log:
completed ports of code in src/core and test/core

Modified:
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Messages/NLS.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FieldCacheRangeFilter.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriterExceptions.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestLazyProxSkipping.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestParallelTermEnum.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestSegmentTermEnum.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTermdocPerf.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTransactions.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Lucene.Net.Test.csproj
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Messages/TestNLS.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDateFilter.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDisjunctionMaxQuery.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDocBoost.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestElevationComparator.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCache.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheRangeFilter.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheTermsFilter.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiThreadTermVectors.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiValuedNumericRangeQuery.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPhrasePrefixQuery.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixFilter.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixQuery.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestScorerPerf.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSetNorm.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSloppyPhraseQuery.cs
    incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/UpdatedTests.txt

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/FileDiffs.txt Sat Nov 19 00:19:05 2011
@@ -7,9 +7,6 @@ store\IndexOutput.java - PORTED * See ID
 store\LockStressTest.java - Text files are different
 store\MMapDirectory.java - Text files are different - PORT ISSUES
 store\NIOFSDirectory.java - Text files are different - PORT ISSUES
-
-
-lucene\util
-	DummyConcurrentLock.java - New in 3.x
-	NamedThreadFactory.java - New in 3.x
-	ThreadInterruptedException.java - new in 3.x (NOT NEEDED IN .NET?)
\ No newline at end of file
+util\DummyConcurrentLock.java - New in 3.x
+util\NamedThreadFactory.java - New in 3.x
+util\ThreadInterruptedException.java - new in 3.x (NOT NEEDED IN .NET?)
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Messages/NLS.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Messages/NLS.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Messages/NLS.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Messages/NLS.cs Sat Nov 19 00:19:05 2011
@@ -98,7 +98,7 @@ namespace Lucene.Net.Messages
 			return str;
 		}
 		
-		public static System.String GetLocalizedMessage(System.String key, System.Object[] args)
+		public static System.String GetLocalizedMessage(System.String key, params System.Object[] args)
 		{
 			return GetLocalizedMessage(key, System.Threading.Thread.CurrentThread.CurrentCulture, args);
 		}

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FieldCacheRangeFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FieldCacheRangeFilter.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FieldCacheRangeFilter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/FieldCacheRangeFilter.cs Sat Nov 19 00:19:05 2011
@@ -152,11 +152,11 @@ namespace Lucene.Net.Search
             }
         }
         [Serializable]
-        private class AnonymousClassFieldCacheRangeFilter1 : FieldCacheRangeFilter<byte?>
+        private class AnonymousClassFieldCacheRangeFilter1 : FieldCacheRangeFilter<sbyte?>
         {
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
-                private void InitBlock(sbyte[] values, byte inclusiveLowerPoint, byte inclusiveUpperPoint, FieldCacheRangeFilter<byte?> enclosingInstance)
+                private void InitBlock(sbyte[] values, sbyte inclusiveLowerPoint, sbyte inclusiveUpperPoint, FieldCacheRangeFilter<sbyte?> enclosingInstance)
                 {
                     this.values = values;
                     this.inclusiveLowerPoint = inclusiveLowerPoint;
@@ -164,10 +164,10 @@ namespace Lucene.Net.Search
                     this.enclosingInstance = enclosingInstance;
                 }
                 private sbyte[] values;
-                private byte inclusiveLowerPoint;
-                private byte inclusiveUpperPoint;
-                private FieldCacheRangeFilter<byte?> enclosingInstance;
-                public FieldCacheRangeFilter<byte?> Enclosing_Instance
+                private sbyte inclusiveLowerPoint;
+                private sbyte inclusiveUpperPoint;
+                private FieldCacheRangeFilter<sbyte?> enclosingInstance;
+                public FieldCacheRangeFilter<sbyte?> Enclosing_Instance
                 {
                     get
                     {
@@ -175,7 +175,7 @@ namespace Lucene.Net.Search
                     }
 
                 }
-                internal AnonymousClassFieldCacheDocIdSet(sbyte[] values, byte inclusiveLowerPoint, byte inclusiveUpperPoint, FieldCacheRangeFilter<byte?> enclosingInstance, Lucene.Net.Index.IndexReader Param1, bool Param2)
+                internal AnonymousClassFieldCacheDocIdSet(sbyte[] values, sbyte inclusiveLowerPoint, sbyte inclusiveUpperPoint, FieldCacheRangeFilter<sbyte?> enclosingInstance, Lucene.Net.Index.IndexReader Param1, bool Param2)
                     : base(Param1, Param2)
                 {
                     InitBlock(values, inclusiveLowerPoint, inclusiveUpperPoint, enclosingInstance);
@@ -185,35 +185,35 @@ namespace Lucene.Net.Search
                     return values[doc] >= inclusiveLowerPoint && values[doc] <= inclusiveUpperPoint;
                 }
             }
-            internal AnonymousClassFieldCacheRangeFilter1(string field, Parser parser, byte? lowerVal, byte? upperVal, bool includeLower, bool includeUpper)
+            internal AnonymousClassFieldCacheRangeFilter1(string field, Parser parser, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
                 : base(field, parser, lowerVal, upperVal, includeLower, includeUpper)
             {
             }
             public override DocIdSet GetDocIdSet(IndexReader reader)
             {
-                byte inclusiveLowerPoint;
-                byte inclusiveUpperPoint;
+                sbyte inclusiveLowerPoint;
+                sbyte inclusiveUpperPoint;
                 if (lowerVal != null)
                 {
-                    byte i = (byte)lowerVal;
+                    sbyte i = (sbyte)lowerVal;
                     if (!includeLower && i == byte.MaxValue)
                         return DocIdSet.EMPTY_DOCIDSET;
-                    inclusiveLowerPoint = (byte)(includeLower ? i : (i + 1));
+                    inclusiveLowerPoint = (sbyte)(includeLower ? i : (i + 1));
                 }
                 else
                 {
-                    inclusiveLowerPoint = byte.MinValue;
+                    inclusiveLowerPoint = sbyte.MinValue;
                 }
                 if (upperVal != null)
                 {
-                    byte i = (byte)upperVal;
-                    if (!includeUpper && i == byte.MinValue)
+                    sbyte i = (sbyte)upperVal;
+                    if (!includeUpper && i == sbyte.MinValue)
                         return DocIdSet.EMPTY_DOCIDSET;
-                    inclusiveUpperPoint = (byte)(includeUpper ? i : (i - 1));
+                    inclusiveUpperPoint = (sbyte)(includeUpper ? i : (i - 1));
                 }
                 else
                 {
-                    inclusiveUpperPoint = byte.MaxValue;
+                    inclusiveUpperPoint = sbyte.MaxValue;
                 }
 
                 if (inclusiveLowerPoint > inclusiveUpperPoint)
@@ -611,7 +611,7 @@ namespace Lucene.Net.Search
         /// byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
         /// of the values to <c>null</c>.
         /// </summary>
-        public static FieldCacheRangeFilter<byte?> NewByteRange(string field, byte? lowerVal, byte? upperVal, bool includeLower, bool includeUpper)
+        public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
         {
             return NewByteRange(field, null, lowerVal, upperVal, includeLower, includeUpper);
         }
@@ -620,7 +620,7 @@ namespace Lucene.Net.Search
         /// byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
         /// of the values to <c>null</c>.
         /// </summary>
-        public static FieldCacheRangeFilter<byte?> NewByteRange(string field, Lucene.Net.Search.ByteParser parser, byte? lowerVal, byte? upperVal, bool includeLower, bool includeUpper)
+        public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, Lucene.Net.Search.ByteParser parser, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
         {
             return new AnonymousClassFieldCacheRangeFilter1(field, parser, lowerVal, upperVal, includeLower, includeUpper);
         }

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/src/core/Search/ParallelMultiSearcher.cs Sat Nov 19 00:19:05 2011
@@ -98,6 +98,7 @@ namespace Lucene.Net.Search
                 tasks[i] = Task.Factory.StartNew(() => searchable.DocFreq(term));
             }
 
+	        Task.WaitAll(tasks);
 	        return tasks.Sum(task => task.Result);
 	    }
 		
@@ -122,6 +123,7 @@ namespace Lucene.Net.Search
 
 		    int totalHits = 0;
 		    float maxScore = float.NegativeInfinity;
+		    Task.WaitAll(tasks);
             foreach(TopDocs topDocs in tasks.Select(x => x.Result))
             {
                 totalHits += topDocs.totalHits;
@@ -158,6 +160,7 @@ namespace Lucene.Net.Search
 
 		    int totalHits = 0;
 		    float maxScore = float.NegativeInfinity;
+            Task.WaitAll(tasks);
             foreach (TopFieldDocs topFieldDocs in tasks.Select(x => x.Result))
             {
                 totalHits += topFieldDocs.totalHits;

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriterExceptions.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriterExceptions.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriterExceptions.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestIndexWriterExceptions.cs Sat Nov 19 00:19:05 2011
@@ -232,7 +232,7 @@ namespace Lucene.Net.Index
 			}
 			
 			// Confirm that when doc hits exception partway through tokenization, it's deleted:
-			IndexReader r2 = IndexReader.Open(dir);
+			IndexReader r2 = IndexReader.Open(dir, true);
 			int count = r2.DocFreq(new Term("content4", "aaa"));
 			int count2 = r2.DocFreq(new Term("content4", "ddd"));
 			Assert.AreEqual(count, count2);
@@ -289,7 +289,7 @@ namespace Lucene.Net.Index
 			}
 			
 			// Confirm that when doc hits exception partway through tokenization, it's deleted:
-			IndexReader r2 = IndexReader.Open(dir);
+		    IndexReader r2 = IndexReader.Open(dir, true);
 			int count = r2.DocFreq(new Term("content4", "aaa"));
 			int count2 = r2.DocFreq(new Term("content4", "ddd"));
 			Assert.AreEqual(count, count2);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestLazyProxSkipping.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestLazyProxSkipping.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestLazyProxSkipping.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestLazyProxSkipping.cs Sat Nov 19 00:19:05 2011
@@ -164,7 +164,7 @@ namespace Lucene.Net.Index
 			}
 			
 			writer.Close();
-			IndexReader reader = IndexReader.Open(directory);
+		    IndexReader reader = IndexReader.Open(directory, true);
 			TermPositions tp = reader.TermPositions();
 			tp.Seek(new Term(this.field, "b"));
 			for (int i = 0; i < 10; i++)

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestParallelTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestParallelTermEnum.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestParallelTermEnum.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestParallelTermEnum.cs Sat Nov 19 00:19:05 2011
@@ -63,8 +63,8 @@ namespace Lucene.Net.Index
 			
 			iw2.Close();
 			
-			this.ir1 = IndexReader.Open(rd1);
-			this.ir2 = IndexReader.Open(rd2);
+			this.ir1 = IndexReader.Open(rd1, true);
+		    this.ir2 = IndexReader.Open(rd2, true);
 		}
 		
 		[TearDown]

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestSegmentTermEnum.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestSegmentTermEnum.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestSegmentTermEnum.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestSegmentTermEnum.cs Sat Nov 19 00:19:05 2011
@@ -86,7 +86,7 @@ namespace Lucene.Net.Index
 		
 		private void  VerifyDocFreq()
 		{
-			IndexReader reader = IndexReader.Open(dir);
+		    IndexReader reader = IndexReader.Open(dir, true);
 			TermEnum termEnum = null;
 			
 			// create enumeration of all terms

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTermdocPerf.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTermdocPerf.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTermdocPerf.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTermdocPerf.cs Sat Nov 19 00:19:05 2011
@@ -130,8 +130,8 @@ namespace Lucene.Net.Index
 			AddDocs(dir, ndocs, "foo", "val", maxTF, percentDocs);
 			long end = (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond);
 			System.Console.Out.WriteLine("milliseconds for creation of " + ndocs + " docs = " + (end - start));
-			
-			IndexReader reader = IndexReader.Open(dir);
+
+		    IndexReader reader = IndexReader.Open(dir, true);
 			TermEnum tenum = reader.Terms(new Term("foo", "val"));
 			TermDocs tdocs = reader.TermDocs();
 			

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTransactions.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTransactions.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTransactions.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Index/TestTransactions.cs Sat Nov 19 00:19:05 2011
@@ -225,8 +225,8 @@ namespace Lucene.Net.Index
 				IndexReader r1, r2;
 				lock (lock_Renamed)
 				{
-					r1 = IndexReader.Open(dir1);
-					r2 = IndexReader.Open(dir2);
+					r1 = IndexReader.Open(dir1, true);
+				    r2 = IndexReader.Open(dir2, true);
 				}
 				if (r1.NumDocs() != r2.NumDocs())
 					throw new System.SystemException("doc counts differ: r1=" + r1.NumDocs() + " r2=" + r2.NumDocs());

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Lucene.Net.Test.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Lucene.Net.Test.csproj?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Lucene.Net.Test.csproj (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Lucene.Net.Test.csproj Sat Nov 19 00:19:05 2011
@@ -406,6 +406,7 @@
     <Compile Include="Search\TestSimilarity.cs" />
     <Compile Include="Search\TestSimpleExplanations.cs" />
     <Compile Include="Search\TestSimpleExplanationsOfNonMatches.cs" />
+    <Compile Include="Search\TestSloppyPhraseQuery.cs" />
     <Compile Include="Search\TestSort.cs" />
     <Compile Include="Search\TestSpanQueryFilter.cs" />
     <Compile Include="Search\TestTermRangeFilter.cs" />

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Messages/TestNLS.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Messages/TestNLS.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Messages/TestNLS.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Messages/TestNLS.cs Sat Nov 19 00:19:05 2011
@@ -29,14 +29,14 @@ namespace Lucene.Net.Messages
 		[Test]
 		public virtual void  TestMessageLoading()
 		{
-			Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, new System.Object[]{"XXX"});
+			Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX");
             Assert.AreEqual("Syntax Error: XXX", invalidSyntax.GetLocalizedMessage());
 		}
 		
 		[Test]
 		public virtual void  TestMessageLoading_ja()
 		{
-			Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, new System.Object[]{"XXX"});
+			Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX");
 			Assert.AreEqual("構文エラー: XXX", invalidSyntax.GetLocalizedMessage(new System.Globalization.CultureInfo("ja")));
 		}
 		
@@ -46,7 +46,7 @@ namespace Lucene.Net.Messages
 			System.String message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION);
 			Assert.AreEqual("Truncated unicode escape sequence.", message);
 			
-			message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX, new System.Object[]{"XXX"});
+			message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX");
 			Assert.AreEqual("Syntax Error: XXX", message);
 		}
 		
@@ -56,7 +56,7 @@ namespace Lucene.Net.Messages
 			System.String message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, new System.Globalization.CultureInfo("ja"));
 			Assert.AreEqual("切り捨てられたユニコード・エスケープ・シーケンス。", message);
 			
-			message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX, new System.Globalization.CultureInfo("ja"), new System.Object[]{"XXX"});
+			message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX, new System.Globalization.CultureInfo("ja"), "XXX");
 			Assert.AreEqual("構文エラー: XXX", message);
 		}
 		
@@ -75,7 +75,7 @@ namespace Lucene.Net.Messages
 			System.String message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, locale);
 			Assert.AreEqual("Truncated unicode escape sequence.", message);
 			
-			message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX, locale, new System.Object[]{"XXX"});
+			message = NLS.GetLocalizedMessage(MessagesTestBundle.Q0001E_INVALID_SYNTAX, locale, "XXX");
 			Assert.AreEqual("Syntax Error: XXX", message);
 		}
 		

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDateFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDateFilter.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDateFilter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDateFilter.cs Sat Nov 19 00:19:05 2011
@@ -35,7 +35,7 @@ namespace Lucene.Net.Search
 	/// 
 	/// 
 	/// </summary>
-	/// <version>  $Revision: 791175 $
+	/// <version>  $Revision: 821340 $
 	/// </version>
     [TestFixture]
 	public class TestDateFilter:LuceneTestCase
@@ -58,8 +58,8 @@ namespace Lucene.Net.Search
 			writer.AddDocument(doc);
 			writer.Optimize();
 			writer.Close();
-			
-			IndexSearcher searcher = new IndexSearcher(indexStore);
+
+		    IndexSearcher searcher = new IndexSearcher(indexStore, true);
 			
 			// filter that should preserve matches
 			//DateFilter df1 = DateFilter.Before("datefield", now);
@@ -115,8 +115,8 @@ namespace Lucene.Net.Search
 			writer.AddDocument(doc);
 			writer.Optimize();
 			writer.Close();
-			
-			IndexSearcher searcher = new IndexSearcher(indexStore);
+
+		    IndexSearcher searcher = new IndexSearcher(indexStore, true);
 			
 			// filter that should preserve matches
 			//DateFilter df1 = DateFilter.After("datefield", now);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDisjunctionMaxQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDisjunctionMaxQuery.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDisjunctionMaxQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDisjunctionMaxQuery.cs Sat Nov 19 00:19:05 2011
@@ -136,8 +136,8 @@ namespace Lucene.Net.Search
 			}
 			
 			writer.Close();
-			
-			r = IndexReader.Open(index);
+
+		    r = IndexReader.Open(index, true);
 			s = new IndexSearcher(r);
 			s.SetSimilarity(sim);
 		}

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDocBoost.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDocBoost.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDocBoost.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestDocBoost.cs Sat Nov 19 00:19:05 2011
@@ -111,7 +111,7 @@ namespace Lucene.Net.Search
 			
 			float[] scores = new float[4];
 			
-			new IndexSearcher(store).Search(new TermQuery(new Term("field", "word")), new AnonymousClassCollector(scores, this));
+			new IndexSearcher(store, true).Search(new TermQuery(new Term("field", "word")), new AnonymousClassCollector(scores, this));
 			
 			float lastScore = 0.0f;
 			

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestElevationComparator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestElevationComparator.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestElevationComparator.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestElevationComparator.cs Sat Nov 19 00:19:05 2011
@@ -72,7 +72,7 @@ namespace Lucene.Net.Search
 			newq.Add(query, BooleanClause.Occur.SHOULD);
 			newq.Add(GetElevatedQuery(new System.String[]{"id", "a", "id", "x"}), BooleanClause.Occur.SHOULD);
 			
-			Sort sort = new Sort(new SortField[]{new SortField("id", new ElevationComparatorSource(priority), false), new SortField(null, SortField.SCORE, reversed)});
+			Sort sort = new Sort(new SortField("id", new ElevationComparatorSource(priority), false), new SortField(null, SortField.SCORE, reversed));
 			
 			TopFieldCollector topCollector = TopFieldCollector.create(sort, 50, false, true, true, true);
 			searcher.Search(newq, null, topCollector);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCache.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCache.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCache.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCache.cs Sat Nov 19 00:19:05 2011
@@ -60,7 +60,7 @@ namespace Lucene.Net.Search
 				writer.AddDocument(doc);
 			}
 			writer.Close();
-			reader = IndexReader.Open(directory);
+		    reader = IndexReader.Open(directory, true);
 		}
 		
 		[Test]

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheRangeFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheRangeFilter.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheRangeFilter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheRangeFilter.cs Sat Nov 19 00:19:05 2011
@@ -1,7 +1,7 @@
 /* 
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
+ * this work for Additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
@@ -51,10 +51,10 @@ namespace Lucene.Net.Search
 		
         [Test]
 		public virtual void  TestRangeFilterId()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
-			IndexSearcher search = new IndexSearcher(reader);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
+			IndexSearcher Search = new IndexSearcher(reader);
 			
 			int medId = ((maxId - minId) / 2);
 			
@@ -71,76 +71,76 @@ namespace Lucene.Net.Search
 			
 			// test id, bounded on both ends
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but last");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but first");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, maxIP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 2, result.Length, "all but ends");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, maxIP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, maxIP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + maxId - medId, result.Length, "med and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, medIP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, medIP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + medId - minId, result.Length, "up to med");
 			
 			// unbounded id
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, null, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, null, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "min and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, maxIP, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, maxIP, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "max and down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not min, but up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, maxIP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, maxIP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not max, but down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, maxIP, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, maxIP, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(maxId - medId, result.Length, "med and up, not max");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, medIP, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, medIP, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(medId - minId, result.Length, "not min, up to med");
 			
 			// very small sets
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, minIP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, minIP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "min,min,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, medIP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, medIP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "med,med,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", maxIP, maxIP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", maxIP, maxIP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "max,max,F,F");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, minIP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", minIP, minIP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "min,min,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, minIP, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", null, minIP, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "nul,min,F,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", maxIP, maxIP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", maxIP, maxIP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,max,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", maxIP, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", maxIP, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,nul,T,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, medIP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("id", medIP, medIP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "med,med,T,T");
 		}
 		
         [Test]
 		public virtual void  TestFieldCacheRangeFilterRand()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
-			IndexSearcher search = new IndexSearcher(reader);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
+			IndexSearcher Search = new IndexSearcher(reader);
 			
 			System.String minRP = Pad(signedIndex.minR);
 			System.String maxRP = Pad(signedIndex.maxR);
@@ -154,47 +154,47 @@ namespace Lucene.Net.Search
 			
 			// test extremes, bounded on both ends
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but biggest");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but smallest");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, maxRP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 2, result.Length, "all but extremes");
 			
 			// unbounded
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "smallest and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", null, maxRP, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", null, maxRP, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "biggest and down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not smallest, but up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", null, maxRP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", null, maxRP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not biggest, but down");
 			
 			// very small sets
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, minRP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, minRP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "min,min,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", maxRP, maxRP, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", maxRP, maxRP, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "max,max,F,F");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, minRP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", minRP, minRP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "min,min,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", null, minRP, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", null, minRP, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "nul,min,F,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", maxRP, maxRP, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", maxRP, maxRP, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,max,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", maxRP, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewStringRange("rand", maxRP, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,nul,T,T");
 		}
 		
@@ -202,10 +202,10 @@ namespace Lucene.Net.Search
 		
         [Test]
 		public virtual void  TestFieldCacheRangeFilterShorts()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
-			IndexSearcher search = new IndexSearcher(reader);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
+			IndexSearcher Search = new IndexSearcher(reader);
 			
 			int numDocs = reader.NumDocs();
 			int medId = ((maxId - minId) / 2);
@@ -220,86 +220,86 @@ namespace Lucene.Net.Search
 			
 			// test id, bounded on both ends
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but last");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but first");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 2, result.Length, "all but ends");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + maxId - medId, result.Length, "med and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + medId - minId, result.Length, "up to med");
 			
 			// unbounded id
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, null, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, null, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "min and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, maxIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, maxIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "max and down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not min, but up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not max, but down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, maxIdO, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, maxIdO, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(maxId - medId, result.Length, "med and up, not max");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, medIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, medIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(medId - minId, result.Length, "not min, up to med");
 			
 			// very small sets
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, minIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, minIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "min,min,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, medIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, medIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "med,med,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "max,max,F,F");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, minIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", minIdO, minIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "min,min,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, minIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, minIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "nul,min,F,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,max,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,nul,T,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", medIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "med,med,T,T");
 			
 			// special cases
 			System.Int16 tempAux = (short) System.Int16.MaxValue;
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "overflow special case");
 			System.Int16 tempAux2 = (short) System.Int16.MinValue;
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "overflow special case");
-			result = search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, minIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewShortRange("id", maxIdO, minIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "inverse range");
 		}
 		
         [Test]
 		public virtual void  TestFieldCacheRangeFilterInts()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
-			IndexSearcher search = new IndexSearcher(reader);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
+			IndexSearcher Search = new IndexSearcher(reader);
 			
 			int numDocs = reader.NumDocs();
 			int medId = ((maxId - minId) / 2);
@@ -314,86 +314,86 @@ namespace Lucene.Net.Search
 			
 			// test id, bounded on both ends
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but last");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but first");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 2, result.Length, "all but ends");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + maxId - medId, result.Length, "med and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + medId - minId, result.Length, "up to med");
 			
 			// unbounded id
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, null, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, null, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "min and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, maxIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, maxIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "max and down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not min, but up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not max, but down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, maxIdO, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, maxIdO, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(maxId - medId, result.Length, "med and up, not max");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, medIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, medIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(medId - minId, result.Length, "not min, up to med");
 			
 			// very small sets
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, minIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, minIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "min,min,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, medIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, medIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "med,med,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "max,max,F,F");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, minIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", minIdO, minIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "min,min,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, minIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, minIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "nul,min,F,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,max,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,nul,T,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", medIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "med,med,T,T");
 			
 			// special cases
 			System.Int32 tempAux = (System.Int32) System.Int32.MaxValue;
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "overflow special case");
 			System.Int32 tempAux2 = (System.Int32) System.Int32.MinValue;
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "overflow special case");
-			result = search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, minIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewIntRange("id", maxIdO, minIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "inverse range");
 		}
 		
         [Test]
 		public virtual void  TestFieldCacheRangeFilterLongs()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
-			IndexSearcher search = new IndexSearcher(reader);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
+			IndexSearcher Search = new IndexSearcher(reader);
 			
 			int numDocs = reader.NumDocs();
 			int medId = ((maxId - minId) / 2);
@@ -408,77 +408,77 @@ namespace Lucene.Net.Search
 			
 			// test id, bounded on both ends
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but last");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "all but first");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 2, result.Length, "all but ends");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + maxId - medId, result.Length, "med and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1 + medId - minId, result.Length, "up to med");
 			
 			// unbounded id
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, null, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, null, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "min and up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, maxIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, maxIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "max and down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not min, but up");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs - 1, result.Length, "not max, but down");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, maxIdO, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, maxIdO, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(maxId - medId, result.Length, "med and up, not max");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, medIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, medIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(medId - minId, result.Length, "not min, up to med");
 			
 			// very small sets
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, minIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, minIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "min,min,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, medIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, medIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "med,med,F,F");
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, maxIdO, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, maxIdO, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "max,max,F,F");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, minIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", minIdO, minIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "min,min,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, minIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, minIdO, F, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "nul,min,F,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, maxIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, maxIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,max,T,T");
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, null, T, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, null, T, F), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "max,nul,T,T");
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", medIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(1, result.Length, "med,med,T,T");
 			
 			// special cases
 			System.Int64 tempAux = (long) System.Int64.MaxValue;
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "overflow special case");
 			System.Int64 tempAux2 = (long) System.Int64.MinValue;
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "overflow special case");
-			result = search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, minIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewLongRange("id", maxIdO, minIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "inverse range");
 		}
 		
@@ -486,10 +486,10 @@ namespace Lucene.Net.Search
 		
         [Test]
 		public virtual void  TestFieldCacheRangeFilterFloats()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
-			IndexSearcher search = new IndexSearcher(reader);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
+			IndexSearcher Search = new IndexSearcher(reader);
 			
 			int numDocs = reader.NumDocs();
 			System.Single minIdO = (float) (minId + .5f);
@@ -498,30 +498,30 @@ namespace Lucene.Net.Search
 			ScoreDoc[] result;
 			Query q = new TermQuery(new Term("body", "body"));
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs / 2, result.Length, "find all");
 			int count = 0;
-			result = search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", null, medIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", null, medIdO, F, T), numDocs).ScoreDocs;
 			count += result.Length;
-			result = search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", medIdO, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", medIdO, null, F, F), numDocs).ScoreDocs;
 			count += result.Length;
 			Assert.AreEqual(numDocs, count, "sum of two concenatted ranges");
-			result = search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", null, null, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", null, null, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			System.Single tempAux = (float) System.Single.PositiveInfinity;
-			result = search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "infinity special case");
 			System.Single tempAux2 = (float) System.Single.NegativeInfinity;
-			result = search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewFloatRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "infinity special case");
 		}
 		
         [Test]
 		public virtual void  TestFieldCacheRangeFilterDoubles()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
-			IndexSearcher search = new IndexSearcher(reader);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
+			IndexSearcher Search = new IndexSearcher(reader);
 			
 			int numDocs = reader.NumDocs();
 			System.Double minIdO = (double) (minId + .5);
@@ -530,22 +530,69 @@ namespace Lucene.Net.Search
 			ScoreDoc[] result;
 			Query q = new TermQuery(new Term("body", "body"));
 			
-			result = search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", minIdO, medIdO, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs / 2, result.Length, "find all");
 			int count = 0;
-			result = search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", null, medIdO, F, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", null, medIdO, F, T), numDocs).ScoreDocs;
 			count += result.Length;
-			result = search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", medIdO, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", medIdO, null, F, F), numDocs).ScoreDocs;
 			count += result.Length;
 			Assert.AreEqual(numDocs, count, "sum of two concenatted ranges");
-			result = search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", null, null, T, T), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", null, null, T, T), numDocs).ScoreDocs;
 			Assert.AreEqual(numDocs, result.Length, "find all");
 			System.Double tempAux = (double) System.Double.PositiveInfinity;
-			result = search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", tempAux, null, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "infinity special case");
 			System.Double tempAux2 = (double) System.Double.NegativeInfinity;
-			result = search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
+			result = Search.Search(q, FieldCacheRangeFilter.NewDoubleRange("id", null, tempAux2, F, F), numDocs).ScoreDocs;
 			Assert.AreEqual(0, result.Length, "infinity special case");
 		}
+
+        [Test]
+        // test using a sparse index (with deleted docs). The DocIdSet should be not cacheable, as it uses TermDocs if the range contains 0
+  public void TestSparseIndex()
+        {
+    RAMDirectory dir = new RAMDirectory();
+    IndexWriter writer = new IndexWriter(dir, new SimpleAnalyzer(), T, IndexWriter.MaxFieldLength.LIMITED);
+
+    for (int d = -20; d <= 20; d++) {
+      Document doc = new Document();
+      doc.Add(new Field("id",d.ToString(), Field.Store.NO, Field.Index.NOT_ANALYZED));
+      doc.Add(new Field("body","body", Field.Store.NO, Field.Index.NOT_ANALYZED));
+      writer.AddDocument(doc);
+    }
+    
+    writer.Optimize();
+    writer.DeleteDocuments(new Term("id","0"));
+    writer.Close();
+
+    IndexReader reader = IndexReader.Open(dir);
+    IndexSearcher Search = new IndexSearcher(reader);
+    Assert.True(reader.HasDeletions());
+
+    ScoreDoc[] result;
+    Query q = new TermQuery(new Term("body","body"));
+
+    FieldCacheRangeFilter<sbyte?> fcrf;
+    result = Search.Search(q, fcrf = FieldCacheRangeFilter.NewByteRange("id", -20, 20, T, T), 100).scoreDocs;
+    Assert.False(fcrf.GetDocIdSet(reader.GetSequentialSubReaders()[0]).IsCacheable(), "DocIdSet must be not cacheable");
+    Assert.AreEqual(40, result.Length, "find all");
+
+    result = Search.Search(q, fcrf = FieldCacheRangeFilter.NewByteRange("id", 0, 20, T, T), 100).scoreDocs;
+    Assert.False(fcrf.GetDocIdSet(reader.GetSequentialSubReaders()[0]).IsCacheable(), "DocIdSet must be not cacheable");
+    Assert.AreEqual( 20, result.Length, "find all");
+
+            result = Search.Search(q, fcrf = FieldCacheRangeFilter.NewByteRange("id", -20, 0, T, T), 100).scoreDocs;
+    Assert.False(fcrf.GetDocIdSet(reader.GetSequentialSubReaders()[0]).IsCacheable(), "DocIdSet must be not cacheable");
+    Assert.AreEqual( 20, result.Length, "find all");
+
+    result = Search.Search(q, fcrf = FieldCacheRangeFilter.NewByteRange("id", 10, 20, T, T), 100).scoreDocs;
+    Assert.True(fcrf.GetDocIdSet(reader.GetSequentialSubReaders()[0]).IsCacheable(), "DocIdSet must be not cacheable");
+    Assert.AreEqual( 11, result.Length, "find all");
+
+    result = Search.Search(q, fcrf = FieldCacheRangeFilter.NewByteRange("id", -20, -10, T, T), 100).scoreDocs;
+    Assert.True(fcrf.GetDocIdSet(reader.GetSequentialSubReaders()[0]).IsCacheable(), "DocIdSet must be not cacheable");
+    Assert.AreEqual( 11, result.Length, "find all");
+  }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheTermsFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheTermsFilter.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheTermsFilter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestFieldCacheTermsFilter.cs Sat Nov 19 00:19:05 2011
@@ -53,8 +53,8 @@ namespace Lucene.Net.Search
 				w.AddDocument(doc);
 			}
 			w.Close();
-			
-			IndexReader reader = IndexReader.Open(rd);
+
+            IndexReader reader = IndexReader.Open(rd, true);
 			IndexSearcher searcher = new IndexSearcher(reader);
 			int numDocs = reader.NumDocs();
 			ScoreDoc[] results;

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiThreadTermVectors.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiThreadTermVectors.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiThreadTermVectors.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiThreadTermVectors.cs Sat Nov 19 00:19:05 2011
@@ -30,10 +30,6 @@ using LuceneTestCase = Lucene.Net.Util.L
 
 namespace Lucene.Net.Search
 {
-	
-	/// <summary> </summary>
-	/// <version>  $rcs = ' $Id: TestMultiThreadTermVectors.java 759556 2009-03-28 19:10:55Z mikemccand $ ' ;
-	/// </version>
     [TestFixture]
 	public class TestMultiThreadTermVectors:LuceneTestCase
 	{
@@ -66,7 +62,7 @@ namespace Lucene.Net.Search
 			
 			try
 			{
-				reader = IndexReader.Open(directory);
+			    reader = IndexReader.Open(directory, true);
 				for (int i = 1; i <= numThreads; i++)
 					TestTermPositionVectors(reader, i);
 			}

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiValuedNumericRangeQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiValuedNumericRangeQuery.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiValuedNumericRangeQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestMultiValuedNumericRangeQuery.cs Sat Nov 19 00:19:05 2011
@@ -74,9 +74,7 @@ namespace Lucene.Net.Search
 					int a = lower; lower = upper; upper = a;
 				}
 				TermRangeQuery cq = new TermRangeQuery("asc", lower.ToString().PadLeft(11, '0'),  upper.ToString().PadLeft(11, '0'), true, true);
-				System.Int32 tempAux = (System.Int32) lower;
-				System.Int32 tempAux2 = (System.Int32) upper;
-				NumericRangeQuery<int> tq = NumericRangeQuery.NewIntRange("trie", tempAux, tempAux2, true, true);
+                NumericRangeQuery<int> tq = NumericRangeQuery.NewIntRange("trie", lower, upper, true, true);
 				TopDocs trTopDocs = searcher.Search(cq, 1);
 				TopDocs nrTopDocs = searcher.Search(tq, 1);
 				Assert.AreEqual(trTopDocs.TotalHits, nrTopDocs.TotalHits, "Returned count for NumericRangeQuery and TermRangeQuery must be equal");

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPhrasePrefixQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPhrasePrefixQuery.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPhrasePrefixQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPhrasePrefixQuery.cs Sat Nov 19 00:19:05 2011
@@ -32,12 +32,7 @@ using LuceneTestCase = Lucene.Net.Util.L
 namespace Lucene.Net.Search
 {
 	
-	/// <summary> This class tests PhrasePrefixQuery class.
-	/// 
-	/// 
-	/// </summary>
-	/// <version>  $Id: TestPhrasePrefixQuery.java 694004 2008-09-10 21:38:52Z mikemccand $
-	/// </version>
+	/// <summary>This class tests PhrasePrefixQuery class.</summary>
     [TestFixture]
 	public class TestPhrasePrefixQuery:LuceneTestCase
 	{
@@ -68,8 +63,8 @@ namespace Lucene.Net.Search
 			writer.AddDocument(doc5);
 			writer.Optimize();
 			writer.Close();
-			
-			IndexSearcher searcher = new IndexSearcher(indexStore);
+
+		    IndexSearcher searcher = new IndexSearcher(indexStore, true);
 			
 			//PhrasePrefixQuery query1 = new PhrasePrefixQuery();
 			MultiPhraseQuery query1 = new MultiPhraseQuery();
@@ -79,7 +74,7 @@ namespace Lucene.Net.Search
 			query2.Add(new Term("body", "strawberry"));
 			
 			System.Collections.ArrayList termsWithPrefix = new System.Collections.ArrayList();
-			IndexReader ir = IndexReader.Open(indexStore);
+		    IndexReader ir = IndexReader.Open(indexStore, true);
 			
 			// this TermEnum gives "piccadilly", "pie" and "pizza".
 			System.String prefix = "pi";

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixFilter.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixFilter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixFilter.cs Sat Nov 19 00:19:05 2011
@@ -54,7 +54,7 @@ namespace Lucene.Net.Search
 			// PrefixFilter combined with ConstantScoreQuery
 			PrefixFilter filter = new PrefixFilter(new Term("category", "/Computers"));
 			Query query = new ConstantScoreQuery(filter);
-			IndexSearcher searcher = new IndexSearcher(directory);
+		    IndexSearcher searcher = new IndexSearcher(directory, true);
 			ScoreDoc[] hits = searcher.Search(query, null, 1000).ScoreDocs;
 			Assert.AreEqual(4, hits.Length);
 			

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixQuery.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestPrefixQuery.cs Sat Nov 19 00:19:05 2011
@@ -52,7 +52,7 @@ namespace Lucene.Net.Search
 			writer.Close();
 			
 			PrefixQuery query = new PrefixQuery(new Term("category", "/Computers"));
-			IndexSearcher searcher = new IndexSearcher(directory);
+		    IndexSearcher searcher = new IndexSearcher(directory, true);
 			ScoreDoc[] hits = searcher.Search(query, null, 1000).ScoreDocs;
 			Assert.AreEqual(3, hits.Length, "All documents in /Computers category and below");
 			

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestScorerPerf.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestScorerPerf.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestScorerPerf.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestScorerPerf.cs Sat Nov 19 00:19:05 2011
@@ -387,84 +387,84 @@ namespace Lucene.Net.Search
 			DoNestedConjunctions(10000, 3, 3);
 			s.Close();
 		}
-		
-		/// <summary> 
-		/// int bigIter=10;
-		/// public void testConjunctionPerf() throws Exception {
-		/// r = newRandom();
-		/// createDummySearcher();
-		/// validate=false;
-		/// sets=randBitSets(32,1000000);
-		/// for (int i=0; i<bigIter; i++) {
-		/// long start = System.currentTimeMillis();
-		/// doConjunctions(500,6);
-		/// long end = System.currentTimeMillis();
-		/// System.out.println("milliseconds="+(end-start));
-		/// }
-		/// s.close();
-		/// }
-		/// public void testNestedConjunctionPerf() throws Exception {
-		/// r = newRandom();
-		/// createDummySearcher();
-		/// validate=false;
-		/// sets=randBitSets(32,1000000);
-		/// for (int i=0; i<bigIter; i++) {
-		/// long start = System.currentTimeMillis();
-		/// doNestedConjunctions(500,3,3);
-		/// long end = System.currentTimeMillis();
-		/// System.out.println("milliseconds="+(end-start));
-		/// }
-		/// s.close();
-		/// }
-		/// public void testConjunctionTerms() throws Exception {
-		/// r = newRandom();
-		/// validate=false;
-		/// RAMDirectory dir = new RAMDirectory();
-		/// System.out.println("Creating index");
-		/// createRandomTerms(100000,25,.5, dir);
-		/// s = new IndexSearcher(dir);
-		/// System.out.println("Starting performance test");
-		/// for (int i=0; i<bigIter; i++) {
-		/// long start = System.currentTimeMillis();
-		/// doTermConjunctions(s,25,5,1000);
-		/// long end = System.currentTimeMillis();
-		/// System.out.println("milliseconds="+(end-start));
-		/// }
-		/// s.close();
-		/// }
-		/// public void testNestedConjunctionTerms() throws Exception {
-		/// r = newRandom();
-		/// validate=false;    
-		/// RAMDirectory dir = new RAMDirectory();
-		/// System.out.println("Creating index");
-		/// createRandomTerms(100000,25,.2, dir);
-		/// s = new IndexSearcher(dir);
-		/// System.out.println("Starting performance test");
-		/// for (int i=0; i<bigIter; i++) {
-		/// long start = System.currentTimeMillis();
-		/// doNestedTermConjunctions(s,25,3,3,200);
-		/// long end = System.currentTimeMillis();
-		/// System.out.println("milliseconds="+(end-start));
-		/// }
-		/// s.close();
-		/// }
-		/// public void testSloppyPhrasePerf() throws Exception {
-		/// r = newRandom();
-		/// validate=false;    
-		/// RAMDirectory dir = new RAMDirectory();
-		/// System.out.println("Creating index");
-		/// createRandomTerms(100000,25,2,dir);
-		/// s = new IndexSearcher(dir);
-		/// System.out.println("Starting performance test");
-		/// for (int i=0; i<bigIter; i++) {
-		/// long start = System.currentTimeMillis();
-		/// doSloppyPhrase(s,25,2,1000);
-		/// long end = System.currentTimeMillis();
-		/// System.out.println("milliseconds="+(end-start));
-		/// }
-		/// s.close();
-		/// }
-		/// *
-		/// </summary>
+
+        // <summary> 
+        // int bigIter=10;
+        // public void testConjunctionPerf() throws Exception {
+        // r = newRandom();
+        // createDummySearcher();
+        // validate=false;
+        // sets=randBitSets(32,1000000);
+        // for (int i=0; i<bigIter; i++) {
+        // long start = System.currentTimeMillis();
+        // doConjunctions(500,6);
+        // long end = System.currentTimeMillis();
+        // System.out.println("milliseconds="+(end-start));
+        // }
+        // s.close();
+        // }
+        // public void testNestedConjunctionPerf() throws Exception {
+        // r = newRandom();
+        // createDummySearcher();
+        // validate=false;
+        // sets=randBitSets(32,1000000);
+        // for (int i=0; i<bigIter; i++) {
+        // long start = System.currentTimeMillis();
+        // doNestedConjunctions(500,3,3);
+        // long end = System.currentTimeMillis();
+        // System.out.println("milliseconds="+(end-start));
+        // }
+        // s.close();
+        // }
+        // public void testConjunctionTerms() throws Exception {
+        // r = newRandom();
+        // validate=false;
+        // RAMDirectory dir = new RAMDirectory();
+        // System.out.println("Creating index");
+        // createRandomTerms(100000,25,.5, dir);
+        // s = new IndexSearcher(dir, true);
+        // System.out.println("Starting performance test");
+        // for (int i=0; i<bigIter; i++) {
+        // long start = System.currentTimeMillis();
+        // doTermConjunctions(s,25,5,1000);
+        // long end = System.currentTimeMillis();
+        // System.out.println("milliseconds="+(end-start));
+        // }
+        // s.close();
+        // }
+        // public void testNestedConjunctionTerms() throws Exception {
+        // r = newRandom();
+        // validate=false;    
+        // RAMDirectory dir = new RAMDirectory();
+        // System.out.println("Creating index");
+        // createRandomTerms(100000,25,.2, dir);
+        // s = new IndexSearcher(dir, true);
+        // System.out.println("Starting performance test");
+        // for (int i=0; i<bigIter; i++) {
+        // long start = System.currentTimeMillis();
+        // doNestedTermConjunctions(s,25,3,3,200);
+        // long end = System.currentTimeMillis();
+        // System.out.println("milliseconds="+(end-start));
+        // }
+        // s.close();
+        // }
+        // public void testSloppyPhrasePerf() throws Exception {
+        // r = newRandom();
+        // validate=false;    
+        // RAMDirectory dir = new RAMDirectory();
+        // System.out.println("Creating index");
+        // createRandomTerms(100000,25,2,dir);
+        // s = new IndexSearcher(dir, true);
+        // System.out.println("Starting performance test");
+        // for (int i=0; i<bigIter; i++) {
+        // long start = System.currentTimeMillis();
+        // doSloppyPhrase(s,25,2,1000);
+        // long end = System.currentTimeMillis();
+        // System.out.println("milliseconds="+(end-start));
+        // }
+        // s.close();
+        // }
+        // *
+        // </summary>
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSetNorm.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSetNorm.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSetNorm.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSetNorm.cs Sat Nov 19 00:19:05 2011
@@ -30,12 +30,8 @@ using LuceneTestCase = Lucene.Net.Util.L
 namespace Lucene.Net.Search
 {
 	
-	/// <summary>Document boost unit test.
-	/// 
-	/// 
-	/// </summary>
-	/// <version>  $Revision: 787772 $
-	/// </version>
+	/// <summary>Document boost unit test.</summary>
+	/// <version>$Revision: 832972 $</version>
     [TestFixture]
 	public class TestSetNorm:LuceneTestCase
 	{

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSloppyPhraseQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSloppyPhraseQuery.cs?rev=1203912&r1=1203911&r2=1203912&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSloppyPhraseQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestSloppyPhraseQuery.cs Sat Nov 19 00:19:05 2011
@@ -137,8 +137,8 @@ namespace Lucene.Net.Search
 			IndexWriter writer = new IndexWriter(ramDir, analyzer, MaxFieldLength.UNLIMITED);
 			writer.AddDocument(doc);
 			writer.Close();
-			
-			IndexSearcher searcher = new IndexSearcher(ramDir);
+
+		    IndexSearcher searcher = new IndexSearcher(ramDir, true);
 			TopDocs td = searcher.Search(query, null, 10);
 			//System.out.println("slop: "+slop+"  query: "+query+"  doc: "+doc+"  Expecting number of hits: "+expectedNumResults+" maxScore="+td.getMaxScore());
 			Assert.AreEqual(expectedNumResults, td.TotalHits, "slop: " + slop + "  query: " + query + "  doc: " + doc + "  Wrong number of hits");



Mime
View raw message