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: r1202532 [3/3] - in /incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk: src/core/Analysis/ src/core/Index/ src/core/Search/ src/core/Store/ src/demo/Demo.Common/ test/core/ test/core/Index/ test/core/QueryParser/ test/core/Search/ test/c...
Date Wed, 16 Nov 2011 05:24:28 GMT
Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermRangeFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermRangeFilter.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermRangeFilter.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermRangeFilter.cs Wed Nov 16 05:24:27 2011
@@ -51,9 +51,9 @@ namespace Lucene.Net.Search
 		
         [Test]
 		public virtual void  TestRangeFilterId()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
 			IndexSearcher search = new IndexSearcher(reader);
 			
 			int medId = ((maxId - minId) / 2);
@@ -134,9 +134,9 @@ namespace Lucene.Net.Search
 		
         [Test]
 		public virtual void  TestRangeFilterIdCollating()
-		{
-			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
+        {
+
+            IndexReader reader = IndexReader.Open(signedIndex.index, true);
 			IndexSearcher search = new IndexSearcher(reader);
 			
 			System.Globalization.CompareInfo c = new System.Globalization.CultureInfo("en").CompareInfo;
@@ -151,77 +151,77 @@ namespace Lucene.Net.Search
 			
 			Assert.AreEqual(numDocs, 1 + maxId - minId, "num of docs");
 			
-			Hits result;
 			Query q = new TermQuery(new Term("body", "body"));
 			
 			// test id, bounded on both ends
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, maxIP, T, T, c));
-			Assert.AreEqual(numDocs, result.Length(), "find all");
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, maxIP, T, F, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "all but last");
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, maxIP, F, T, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "all but first");
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, maxIP, F, F, c));
-			Assert.AreEqual(numDocs - 2, result.Length(), "all but ends");
-			
-			result = search.Search(q, new TermRangeFilter("id", medIP, maxIP, T, T, c));
-			Assert.AreEqual(1 + maxId - medId, result.Length(), "med and up");
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, medIP, T, T, c));
-			Assert.AreEqual(1 + medId - minId, result.Length(), "up to med");
+            int numHits = search.Search(q, new TermRangeFilter("id", minIP, maxIP, T, T, c), 1000).TotalHits;
+            Assert.AreEqual(numDocs, numHits, "find all");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, maxIP, T, T, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs, numHits, "find all");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, maxIP, T, F, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "all but last");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, maxIP, F, T, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "all but first");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, maxIP, F, F, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs - 2, numHits, "all but ends");
+
+            numHits = search.Search(q, new TermRangeFilter("id", medIP, maxIP, T, T, c), 1000).TotalHits;
+			Assert.AreEqual(1 + maxId - medId, numHits, "med and up");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, medIP, T, T, c), 1000).TotalHits;
+			Assert.AreEqual(1 + medId - minId, numHits, "up to med");
 			
 			// unbounded id
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, null, T, F, c));
-			Assert.AreEqual(numDocs, result.Length(), "min and up");
-			
-			result = search.Search(q, new TermRangeFilter("id", null, maxIP, F, T, c));
-			Assert.AreEqual(numDocs, result.Length(), "max and down");
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, null, F, F, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "not min, but up");
-			
-			result = search.Search(q, new TermRangeFilter("id", null, maxIP, F, F, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "not max, but down");
-			
-			result = search.Search(q, new TermRangeFilter("id", medIP, maxIP, T, F, c));
-			Assert.AreEqual(maxId - medId, result.Length(), "med and up, not max");
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, medIP, F, T, c));
-			Assert.AreEqual(medId - minId, result.Length(), "not min, up to med");
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, null, T, F, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs, numHits, "min and up");
+
+            numHits = search.Search(q, new TermRangeFilter("id", null, maxIP, F, T, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs, numHits, "max and down");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, null, F, F, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "not min, but up");
+
+            numHits = search.Search(q, new TermRangeFilter("id", null, maxIP, F, F, c), 1000).TotalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "not max, but down");
+
+            numHits = search.Search(q, new TermRangeFilter("id", medIP, maxIP, T, F, c), 1000).TotalHits;
+			Assert.AreEqual(maxId - medId, numHits, "med and up, not max");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, medIP, F, T, c), 1000).TotalHits;
+			Assert.AreEqual(medId - minId, numHits, "not min, up to med");
 			
 			// very small sets
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, minIP, F, F, c));
-			Assert.AreEqual(0, result.Length(), "min,min,F,F");
-			result = search.Search(q, new TermRangeFilter("id", medIP, medIP, F, F, c));
-			Assert.AreEqual(0, result.Length(), "med,med,F,F");
-			result = search.Search(q, new TermRangeFilter("id", maxIP, maxIP, F, F, c));
-			Assert.AreEqual(0, result.Length(), "max,max,F,F");
-			
-			result = search.Search(q, new TermRangeFilter("id", minIP, minIP, T, T, c));
-			Assert.AreEqual(1, result.Length(), "min,min,T,T");
-			result = search.Search(q, new TermRangeFilter("id", null, minIP, F, T, c));
-			Assert.AreEqual(1, result.Length(), "nul,min,F,T");
-			
-			result = search.Search(q, new TermRangeFilter("id", maxIP, maxIP, T, T, c));
-			Assert.AreEqual(1, result.Length(), "max,max,T,T");
-			result = search.Search(q, new TermRangeFilter("id", maxIP, null, T, F, c));
-			Assert.AreEqual(1, result.Length(), "max,nul,T,T");
-			
-			result = search.Search(q, new TermRangeFilter("id", medIP, medIP, T, T, c));
-			Assert.AreEqual(1, result.Length(), "med,med,T,T");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, minIP, F, F, c), 1000).TotalHits;
+			Assert.AreEqual(0, numHits, "min,min,F,F");
+            numHits = search.Search(q, new TermRangeFilter("id", medIP, medIP, F, F, c), 1000).TotalHits;
+			Assert.AreEqual(0, numHits, "med,med,F,F");
+            numHits = search.Search(q, new TermRangeFilter("id", maxIP, maxIP, F, F, c), 1000).TotalHits;
+			Assert.AreEqual(0, numHits, "max,max,F,F");
+
+            numHits = search.Search(q, new TermRangeFilter("id", minIP, minIP, T, T, c), 1000).TotalHits;
+			Assert.AreEqual(1, numHits, "min,min,T,T");
+            numHits = search.Search(q, new TermRangeFilter("id", null, minIP, F, T, c), 1000).TotalHits;
+			Assert.AreEqual(1, numHits, "nul,min,F,T");
+
+            numHits = search.Search(q, new TermRangeFilter("id", maxIP, maxIP, T, T, c), 1000).TotalHits;
+			Assert.AreEqual(1, numHits, "max,max,T,T");
+            numHits = search.Search(q, new TermRangeFilter("id", maxIP, null, T, F, c), 1000).TotalHits;
+			Assert.AreEqual(1, numHits, "max,nul,T,T");
+
+            numHits = search.Search(q, new TermRangeFilter("id", medIP, medIP, T, T, c), 1000).TotalHits;
+			Assert.AreEqual(1, numHits, "med,med,T,T");
 		}
 		
         [Test]
 		public virtual void  TestRangeFilterRand()
 		{
 			
-			IndexReader reader = IndexReader.Open(signedIndex.index);
+			IndexReader reader = IndexReader.Open(signedIndex.index, true);
 			IndexSearcher search = new IndexSearcher(reader);
 			
 			System.String minRP = Pad(signedIndex.minR);
@@ -285,7 +285,7 @@ namespace Lucene.Net.Search
 		{
 			
 			// using the unsigned index because collation seems to ignore hyphens
-			IndexReader reader = IndexReader.Open(unsignedIndex.index);
+            IndexReader reader = IndexReader.Open(unsignedIndex.index, true);
 			IndexSearcher search = new IndexSearcher(reader);
 			
 			System.Globalization.CompareInfo c = new System.Globalization.CultureInfo("en").CompareInfo;
@@ -297,53 +297,52 @@ namespace Lucene.Net.Search
 			
 			Assert.AreEqual(numDocs, 1 + maxId - minId, "num of docs");
 			
-			Hits result;
 			Query q = new TermQuery(new Term("body", "body"));
 			
 			// test extremes, bounded on both ends
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, T, T, c));
-			Assert.AreEqual(numDocs, result.Length(), "find all");
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, T, F, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "all but biggest");
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, F, T, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "all but smallest");
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, F, F, c));
-			Assert.AreEqual(numDocs - 2, result.Length(), "all but extremes");
+
+            int numHits = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, T, T, c), 1000).totalHits;
+			Assert.AreEqual(numDocs, numHits, "find all");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, T, F, c), 1000).totalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "all but biggest");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, F, T, c), 1000).totalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "all but smallest");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", minRP, maxRP, F, F, c), 1000).totalHits;
+			Assert.AreEqual(numDocs - 2, numHits, "all but extremes");
 			
 			// unbounded
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, null, T, F, c));
-			Assert.AreEqual(numDocs, result.Length(), "smallest and up");
-			
-			result = search.Search(q, new TermRangeFilter("rand", null, maxRP, F, T, c));
-			Assert.AreEqual(numDocs, result.Length(), "biggest and down");
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, null, F, F, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "not smallest, but up");
-			
-			result = search.Search(q, new TermRangeFilter("rand", null, maxRP, F, F, c));
-			Assert.AreEqual(numDocs - 1, result.Length(), "not biggest, but down");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", minRP, null, T, F, c), 1000).totalHits;
+			Assert.AreEqual(numDocs, numHits, "smallest and up");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", null, maxRP, F, T, c), 1000).totalHits;
+			Assert.AreEqual(numDocs, numHits, "biggest and down");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", minRP, null, F, F, c), 1000).totalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "not smallest, but up");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", null, maxRP, F, F, c), 1000).totalHits;
+			Assert.AreEqual(numDocs - 1, numHits, "not biggest, but down");
 			
 			// very small sets
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, minRP, F, F, c));
-			Assert.AreEqual(0, result.Length(), "min,min,F,F");
-			result = search.Search(q, new TermRangeFilter("rand", maxRP, maxRP, F, F, c));
-			Assert.AreEqual(0, result.Length(), "max,max,F,F");
-			
-			result = search.Search(q, new TermRangeFilter("rand", minRP, minRP, T, T, c));
-			Assert.AreEqual(1, result.Length(), "min,min,T,T");
-			result = search.Search(q, new TermRangeFilter("rand", null, minRP, F, T, c));
-			Assert.AreEqual(1, result.Length(), "nul,min,F,T");
-			
-			result = search.Search(q, new TermRangeFilter("rand", maxRP, maxRP, T, T, c));
-			Assert.AreEqual(1, result.Length(), "max,max,T,T");
-			result = search.Search(q, new TermRangeFilter("rand", maxRP, null, T, F, c));
-			Assert.AreEqual(1, result.Length(), "max,nul,T,T");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", minRP, minRP, F, F, c), 1000).totalHits;
+			Assert.AreEqual(0, numHits, "min,min,F,F");
+            numHits = search.Search(q, new TermRangeFilter("rand", maxRP, maxRP, F, F, c), 1000).totalHits;
+			Assert.AreEqual(0, numHits, "max,max,F,F");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", minRP, minRP, T, T, c), 1000).totalHits;
+			Assert.AreEqual(1, numHits, "min,min,T,T");
+            numHits = search.Search(q, new TermRangeFilter("rand", null, minRP, F, T, c), 1000).totalHits;
+			Assert.AreEqual(1, numHits, "nul,min,F,T");
+
+            numHits = search.Search(q, new TermRangeFilter("rand", maxRP, maxRP, T, T, c), 1000).totalHits;
+			Assert.AreEqual(1, numHits, "max,max,T,T");
+            numHits = search.Search(q, new TermRangeFilter("rand", maxRP, null, T, F, c), 1000).totalHits;
+			Assert.AreEqual(1, numHits, "max,nul,T,T");
 		}
 		
         [Test]
@@ -354,14 +353,14 @@ namespace Lucene.Net.Search
 			RAMDirectory farsiIndex = new RAMDirectory();
 			IndexWriter writer = new IndexWriter(farsiIndex, new SimpleAnalyzer(), T, IndexWriter.MaxFieldLength.LIMITED);
 			Document doc = new Document();
-			doc.Add(new Field("content", "\u0633\u0627\u0628", Field.Store.YES, Field.Index.UN_TOKENIZED));
-			doc.Add(new Field("body", "body", Field.Store.YES, Field.Index.UN_TOKENIZED));
+			doc.Add(new Field("content", "\u0633\u0627\u0628", Field.Store.YES, Field.Index.NOT_ANALYZED));
+            doc.Add(new Field("body", "body", Field.Store.YES, Field.Index.NOT_ANALYZED));
 			writer.AddDocument(doc);
 			
 			writer.Optimize();
 			writer.Close();
-			
-			IndexReader reader = IndexReader.Open(farsiIndex);
+
+            IndexReader reader = IndexReader.Open(farsiIndex, true);
 			IndexSearcher search = new IndexSearcher(reader);
 			Query q = new TermQuery(new Term("body", "body"));
 			
@@ -374,11 +373,11 @@ namespace Lucene.Net.Search
 			// orders the U+0698 character before the U+0633 character, so the single
 			// index Term below should NOT be returned by a TermRangeFilter with a Farsi
 			// Collator (or an Arabic one for the case when Farsi is not supported).
-			Hits result = search.Search(q, new TermRangeFilter("content", "\u062F", "\u0698", T, T, collator));
-			Assert.AreEqual(0, result.Length(), "The index Term should not be included.");
-			
-			result = search.Search(q, new TermRangeFilter("content", "\u0633", "\u0638", T, T, collator));
-			Assert.AreEqual(1, result.Length(), "The index Term should be included.");
+            int numHits = search.Search(q, new TermRangeFilter("content", "\u062F", "\u0698", T, T, collator), 1000).TotalHits;
+            Assert.AreEqual(0, numHits, "The index Term should not be included.");
+
+            numHits = search.Search(q, new TermRangeFilter("content", "\u0633", "\u0638", T, T, collator), 1000).TotalHits;
+            Assert.AreEqual(1, numHits, "The index Term should be included.");
 			search.Close();
 		}
 		
@@ -395,14 +394,14 @@ namespace Lucene.Net.Search
 			for (int docnum = 0; docnum < words.Length; ++docnum)
 			{
 				Document doc = new Document();
-				doc.Add(new Field("content", words[docnum], Field.Store.YES, Field.Index.UN_TOKENIZED));
-				doc.Add(new Field("body", "body", Field.Store.YES, Field.Index.UN_TOKENIZED));
+				doc.Add(new Field("content", words[docnum], Field.Store.YES, Field.Index.NOT_ANALYZED));
+				doc.Add(new Field("body", "body", Field.Store.YES, Field.Index.NOT_ANALYZED));
 				writer.AddDocument(doc);
 			}
 			writer.Optimize();
 			writer.Close();
-			
-			IndexReader reader = IndexReader.Open(danishIndex);
+
+            IndexReader reader = IndexReader.Open(danishIndex, true);
 			IndexSearcher search = new IndexSearcher(reader);
 			Query q = new TermQuery(new Term("body", "body"));
 			
@@ -411,11 +410,12 @@ namespace Lucene.Net.Search
 			
 			// Unicode order would not include "H\u00C5T" in [ "H\u00D8T", "MAND" ],
 			// but Danish collation does.
-			Hits result = search.Search(q, new TermRangeFilter("content", "H\u00D8T", "MAND", F, F, collator));
-			Assert.AreEqual(1, result.Length(), "The index Term should be included.");
+            int numHits =
+                search.Search(q, new TermRangeFilter("content", "H\u00D8T", "MAND", F, F, collator), 1000).TotalHits;
+			Assert.AreEqual(1, numHits, "The index Term should be included.");
 			
-			result = search.Search(q, new TermRangeFilter("content", "H\u00C5T", "MAND", F, F, collator));
-			Assert.AreEqual(0, result.Length(), "The index Term should not be included.");
+			numHits = search.Search(q, new TermRangeFilter("content", "H\u00C5T", "MAND", F, F, collator), 1000).TotalHits;
+			Assert.AreEqual(0, numHits, "The index Term should not be included.");
 			search.Close();
 		}
 	}

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermVectors.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermVectors.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermVectors.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTermVectors.cs Wed Nov 16 05:24:27 2011
@@ -70,7 +70,7 @@ namespace Lucene.Net.Search
 				writer.AddDocument(doc);
 			}
 			writer.Close();
-			searcher = new IndexSearcher(directory);
+		    searcher = new IndexSearcher(directory, true);
 		}
 		
 		[Test]
@@ -113,7 +113,7 @@ namespace Lucene.Net.Search
 			doc.Add(new Field("x", "some content here", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
 			writer.AddDocument(doc);
 			writer.Close();
-			IndexReader reader = IndexReader.Open(dir);
+		    IndexReader reader = IndexReader.Open(dir, true);
 			TermFreqVector[] v = reader.GetTermFreqVectors(0);
 			Assert.AreEqual(4, v.Length);
 			System.String[] expectedFields = new System.String[]{"a", "b", "c", "x"};
@@ -271,7 +271,7 @@ namespace Lucene.Net.Search
 				writer.AddDocument(testDoc3);
 				writer.AddDocument(testDoc4);
 				writer.Close();
-				IndexSearcher knownSearcher = new IndexSearcher(dir);
+			    IndexSearcher knownSearcher = new IndexSearcher(dir, true);
 				TermEnum termEnum = knownSearcher.reader_ForNUnit.Terms();
 				TermDocs termDocs = knownSearcher.reader_ForNUnit.TermDocs();
 				//System.out.println("Terms: " + termEnum.size() + " Orig Len: " + termArray.length);
@@ -289,7 +289,7 @@ namespace Lucene.Net.Search
 						//System.out.println("Doc Id: " + docId + " freq " + freq);
 						TermFreqVector vector = knownSearcher.reader_ForNUnit.GetTermFreqVector(docId, "field");
 						float tf = sim.Tf(freq);
-						float idf = sim.Idf(term, knownSearcher);
+						float idf = sim.Idf(knownSearcher.DocFreq(term), knownSearcher.MaxDoc());
 						//float qNorm = sim.queryNorm()
 						//This is fine since we don't have stop words
 						float lNorm = sim.LengthNorm("field", vector.GetTerms().Length);
@@ -404,7 +404,7 @@ namespace Lucene.Net.Search
 			}
 			
 			writer.Close();
-			searcher = new IndexSearcher(directory);
+		    searcher = new IndexSearcher(directory, true);
 			
 			Query query = new TermQuery(new Term("field", "hundred"));
 			ScoreDoc[] hits = searcher.Search(query, null, 1000).ScoreDocs;
@@ -432,8 +432,8 @@ namespace Lucene.Net.Search
 			doc.Add(new Field("field", "one", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
 			writer.AddDocument(doc);
 			writer.Close();
-			
-			searcher = new IndexSearcher(directory);
+
+		    searcher = new IndexSearcher(directory, true);
 			
 			Query query = new TermQuery(new Term("field", "one"));
 			ScoreDoc[] hits = searcher.Search(query, null, 1000).ScoreDocs;

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestThreadSafe.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestThreadSafe.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestThreadSafe.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestThreadSafe.cs Wed Nov 16 05:24:27 2011
@@ -29,10 +29,6 @@ using LuceneTestCase = Lucene.Net.Util.L
 
 namespace Lucene.Net.Search
 {
-	
-	/// <summary> </summary>
-	/// <version>  $Id: TestThreadSafe.java 741311 2009-02-05 21:53:40Z mikemccand $
-	/// </version>
     [TestFixture]
 	public class TestThreadSafe:LuceneTestCase
 	{
@@ -137,10 +133,10 @@ namespace Lucene.Net.Search
 				// beware of deleted docs in the future
 				Document doc = ir.Document(rand.Next(ir.MaxDoc()), new AnonymousClassFieldSelector(this));
 				
-				System.Collections.IList fields = doc.GetFields();
+				var fields = doc.GetFields();
 				for (int i = 0; i < fields.Count; i++)
 				{
-					Fieldable f = (Fieldable) fields[i];
+					Fieldable f = fields[i];
 					Enclosing_Instance.ValidateField(f);
 				}
 			}
@@ -212,7 +208,7 @@ namespace Lucene.Net.Search
 			// do many small tests so the thread locals go away inbetween
 			for (int i = 0; i < 100; i++)
 			{
-				ir1 = IndexReader.Open(dir1);
+			    ir1 = IndexReader.Open(dir1, false);
 				DoTest(10, 100);
 			}
 		}

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTimeLimitingCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTimeLimitingCollector.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTimeLimitingCollector.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTimeLimitingCollector.cs Wed Nov 16 05:24:27 2011
@@ -115,14 +115,15 @@ namespace Lucene.Net.Search
 				Add(docText[i % docText.Length], iw);
 			}
 			iw.Close();
-			searcher = new IndexSearcher(directory);
+		    searcher = new IndexSearcher(directory, true);
 			
 			System.String qtxt = "one";
+            // start from 1, so that the 0th doc never matches
 			for (int i = 0; i < docText.Length; i++)
 			{
 				qtxt += (' ' + docText[i]); // large query so that search will be longer
 			}
-			QueryParser queryParser = new QueryParser(FIELD_NAME, new WhitespaceAnalyzer());
+			QueryParser queryParser = new QueryParser(Util.Version.LUCENE_CURRENT, FIELD_NAME, new WhitespaceAnalyzer());
 			query = queryParser.Parse(qtxt);
 			
 			// warm the searcher
@@ -391,8 +392,7 @@ namespace Lucene.Net.Search
 					}
 					catch (System.Threading.ThreadInterruptedException ie)
 					{
-						ThreadClass.Current().Interrupt();
-						throw new System.SystemException("", ie);
+					    throw;
 					}
 				}
 				System.Diagnostics.Debug.Assert(docId >= 0, "base=" + docBase + " doc=" + doc);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTopScoreDocCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTopScoreDocCollector.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTopScoreDocCollector.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Search/TestTopScoreDocCollector.cs Wed Nov 16 05:24:27 2011
@@ -41,61 +41,46 @@ namespace Lucene.Net.Search
 		public TestTopScoreDocCollector(System.String name):base(name)
 		{
 		}
-		
+
         [Test]
-		public virtual void  TestOutOfOrderCollection()
-		{
-			
-			Directory dir = new RAMDirectory();
-			IndexWriter writer = new IndexWriter(dir, null, MaxFieldLength.UNLIMITED);
-			for (int i = 0; i < 10; i++)
-			{
-				writer.AddDocument(new Document());
-			}
-			writer.Commit();
-			writer.Close();
-			
-			bool[] inOrder = new bool[]{false, true};
-			System.String[] actualTSDCClass = new System.String[]{"OutOfOrderTopScoreDocCollector", "InOrderTopScoreDocCollector"};
-			
-			// Save the original value to set later.
-			bool origVal = BooleanQuery.GetAllowDocsOutOfOrder();
-			
-			BooleanQuery.SetAllowDocsOutOfOrder(true);
-			
-			BooleanQuery bq = new BooleanQuery();
-			// Add a Query with SHOULD, since bw.scorer() returns BooleanScorer2
-			// which delegates to BS if there are no mandatory clauses.
-			bq.Add(new MatchAllDocsQuery(), Occur.SHOULD);
-			// Set minNrShouldMatch to 1 so that BQ will not optimize rewrite to return
-			// the clause instead of BQ.
-			bq.SetMinimumNumberShouldMatch(1);
-			try
-			{
-				
-				IndexSearcher searcher = new IndexSearcher(dir);
-				for (int i = 0; i < inOrder.Length; i++)
-				{
-					TopDocsCollector tdc = TopScoreDocCollector.create(3, inOrder[i]);
-					Assert.AreEqual("Lucene.Net.Search.TopScoreDocCollector+" + actualTSDCClass[i], tdc.GetType().FullName);
-					
-					searcher.Search(new MatchAllDocsQuery(), tdc);
-					
-					ScoreDoc[] sd = tdc.TopDocs().ScoreDocs;
-					Assert.AreEqual(3, sd.Length);
-					for (int j = 0; j < sd.Length; j++)
-					{
-						Assert.AreEqual(j, sd[j].doc, "expected doc Id " + j + " found " + sd[j].doc);
-					}
-				}
-			}
-			finally
-			{
-				// Whatever happens, reset BooleanQuery.allowDocsOutOfOrder to the
-				// original value. Don't set it to false in case the implementation in BQ
-				// will change some day.
-				BooleanQuery.SetAllowDocsOutOfOrder(origVal);
-			}
-		}
+        public virtual void TestOutOfOrderCollection()
+        {
+
+            Directory dir = new RAMDirectory();
+            IndexWriter writer = new IndexWriter(dir, null, MaxFieldLength.UNLIMITED);
+            for (int i = 0; i < 10; i++)
+            {
+                writer.AddDocument(new Document());
+            }
+            writer.Commit();
+            writer.Close();
+
+            bool[] inOrder = new bool[] {false, true};
+            System.String[] actualTSDCClass = new System.String[]
+                                                  {"OutOfOrderTopScoreDocCollector", "InOrderTopScoreDocCollector"};
+
+            BooleanQuery bq = new BooleanQuery();
+            // Add a Query with SHOULD, since bw.scorer() returns BooleanScorer2
+            // which delegates to BS if there are no mandatory clauses.
+            bq.Add(new MatchAllDocsQuery(), Occur.SHOULD);
+            // Set minNrShouldMatch to 1 so that BQ will not optimize rewrite to return
+            // the clause instead of BQ.
+            bq.SetMinimumNumberShouldMatch(1);
+            IndexSearcher searcher = new IndexSearcher(dir, true);
+            for (int i = 0; i < inOrder.Length; i++)
+            {
+                TopDocsCollector<ScoreDoc> tdc = TopScoreDocCollector.create(3, inOrder[i]);
+                Assert.AreEqual("Lucene.Net.Search.TopScoreDocCollector+" + actualTSDCClass[i], tdc.GetType().FullName);
+
+                searcher.Search(new MatchAllDocsQuery(), tdc);
+
+                ScoreDoc[] sd = tdc.TopDocs().ScoreDocs;
+                Assert.AreEqual(3, sd.Length);
+                for (int j = 0; j < sd.Length; j++)
+                {
+                    Assert.AreEqual(j, sd[j].doc, "expected doc Id " + j + " found " + sd[j].doc);
+                }
+            }
+        }
 	}
 }
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Store/TestFileSwitchDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Store/TestFileSwitchDirectory.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Store/TestFileSwitchDirectory.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/Store/TestFileSwitchDirectory.cs Wed Nov 16 05:24:27 2011
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Collections.Generic;
 using Lucene.Net.Support;
 using NUnit.Framework;
 
@@ -36,9 +37,9 @@ namespace Lucene.Net.Store
         [Test]
 		public virtual void  TestBasic()
 		{
-			System.Collections.Hashtable fileExtensions = new System.Collections.Hashtable();
-			CollectionsHelper.AddIfNotContains(fileExtensions, "fdt");
-			CollectionsHelper.AddIfNotContains(fileExtensions, "fdx");
+            HashSet<string> fileExtensions = new HashSet<string>();
+		    fileExtensions.Add("fdt");
+            fileExtensions.Add("fdx");
 			
 			Directory primaryDir = new MockRAMDirectory();
 			RAMDirectory secondaryDir = new MockRAMDirectory();

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestMergeSchedulerExternal.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestMergeSchedulerExternal.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestMergeSchedulerExternal.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestMergeSchedulerExternal.cs Wed Nov 16 05:24:27 2011
@@ -118,13 +118,13 @@ namespace Lucene.Net
 				thread.Name = "MyMergeThread";
 				return thread;
 			}
-			
-			protected internal override void  HandleMergeException(System.Exception t)
+
+            protected internal override void HandleMergeException(System.Exception t)
 			{
 				Enclosing_Instance.excCalled = true;
 			}
-			
-			protected internal override void  DoMerge(MergePolicy.OneMerge merge)
+
+            protected internal override void DoMerge(MergePolicy.OneMerge merge)
 			{
 				Enclosing_Instance.mergeCalled = true;
 				base.DoMerge(merge);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearch.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearch.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearch.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearch.cs Wed Nov 16 05:24:27 2011
@@ -30,11 +30,7 @@ using LuceneTestCase = Lucene.Net.Util.L
 namespace Lucene.Net
 {
 	
-	/// <summary>JUnit adaptation of an older test case SearchTest.
-	/// 
-	/// </summary>
-	/// <version>  $Id: TestSearch.java 694004 2008-09-10 21:38:52Z mikemccand $
-	/// </version>
+	/// <summary>JUnit adaptation of an older test case SearchTest.</summary>
 	[TestFixture]
 	public class TestSearch:LuceneTestCase
 	{
@@ -93,13 +89,13 @@ namespace Lucene.Net
 				writer.AddDocument(d);
 			}
 			writer.Close();
-			
-			Searcher searcher = new IndexSearcher(directory);
+
+		    Searcher searcher = new IndexSearcher(directory, true);
 			
 			System.String[] queries = new System.String[]{"a b", "\"a b\"", "\"a b c\"", "a c", "\"a c\"", "\"a c e\""};
 			ScoreDoc[] hits = null;
 			
-			QueryParser parser = new QueryParser("contents", analyzer);
+			QueryParser parser = new QueryParser(Util.Version.LUCENE_CURRENT, "contents", analyzer);
 			parser.SetPhraseSlop(4);
 			for (int j = 0; j < queries.Length; j++)
 			{

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearchForDuplicates.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearchForDuplicates.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearchForDuplicates.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSearchForDuplicates.cs Wed Nov 16 05:24:27 2011
@@ -31,11 +31,7 @@ namespace Lucene.Net
 {
 	
 	
-	/// <summary>JUnit adaptation of an older test case DocTest.
-	/// 
-	/// </summary>
-	/// <version>  $Id: TestSearchForDuplicates.java 694004 2008-09-10 21:38:52Z mikemccand $
-	/// </version>
+	/// <summary>JUnit adaptation of an older test case DocTest.</summary>
     [TestFixture]
     public class TestSearchForDuplicates : LuceneTestCase
 	{
@@ -106,9 +102,9 @@ namespace Lucene.Net
 			writer.Close();
 			
 			// try a search without OR
-			Searcher searcher = new IndexSearcher(directory);
+			Searcher searcher = new IndexSearcher(directory, true);
 			
-			QueryParser parser = new QueryParser(PRIORITY_FIELD, analyzer);
+			QueryParser parser = new QueryParser(Util.Version.LUCENE_CURRENT, PRIORITY_FIELD, analyzer);
 			
 			Query query = parser.Parse(HIGH_PRIORITY);
 			out_Renamed.WriteLine("Query: " + query.ToString(PRIORITY_FIELD));
@@ -120,10 +116,10 @@ namespace Lucene.Net
 			searcher.Close();
 			
 			// try a new search with OR
-			searcher = new IndexSearcher(directory);
+		    searcher = new IndexSearcher(directory, true);
 			hits = null;
 			
-			parser = new QueryParser(PRIORITY_FIELD, analyzer);
+			parser = new QueryParser(Util.Version.LUCENE_CURRENT, PRIORITY_FIELD, analyzer);
 			
 			query = parser.Parse(HIGH_PRIORITY + " OR " + MED_PRIORITY);
 			out_Renamed.WriteLine("Query: " + query.ToString(PRIORITY_FIELD));

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSupportClass.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSupportClass.cs?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSupportClass.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/TestSupportClass.cs Wed Nov 16 05:24:27 2011
@@ -32,7 +32,7 @@ using NUnit.Framework;
 using System.Collections.Generic;
 using System.Security.Permissions;
 using Lucene.Net.Test;
-
+using Version = Lucene.Net.Util.Version;
 
 
 namespace Lucene.Net._SupportClass
@@ -350,9 +350,9 @@ namespace Lucene.Net._SupportClass
 
             System.Threading.Tasks.Parallel.For(0, LoopCount, (i) =>
             {
-                analyzers[i] = new Lucene.Net.Analysis.Standard.StandardAnalyzer();
+                analyzers[i] = new Lucene.Net.Analysis.Standard.StandardAnalyzer(Version.LUCENE_CURRENT);
                 dirs[i] = new RAMDirectory();
-                indexWriters[i] = new IndexWriter(dirs[i], analyzers[i], true);
+                indexWriters[i] = new IndexWriter(dirs[i], analyzers[i], true, IndexWriter.MaxFieldLength.UNLIMITED);
             });
 
             System.Threading.Tasks.Parallel.For(0, LoopCount, (i) =>
@@ -924,7 +924,7 @@ namespace Lucene.Net._SupportClass
                 IndexWriter writer;
                 IndexReader reader;
 
-                using (writer = new IndexWriter(dir, new WhitespaceAnalyzer(), true))
+                using (writer = new IndexWriter(dir, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED))
                 {
                     Field field = new Field("name", "value", Field.Store.YES,Field.Index.ANALYZED);
                     doc = new Document();
@@ -1025,7 +1025,7 @@ namespace Lucene.Net._SupportClass
         [Test]
         public void TestFSDirectorySync()
         {
-            System.IO.FileInfo path = new System.IO.FileInfo(System.IO.Path.Combine(AppSettings.Get("tempDir", ""), "testsync"));
+            System.IO.DirectoryInfo path = new System.IO.DirectoryInfo(System.IO.Path.Combine(AppSettings.Get("tempDir", ""), "testsync"));
             Lucene.Net.Store.Directory directory = new Lucene.Net.Store.SimpleFSDirectory(path, null);
             try
             {
@@ -1047,7 +1047,7 @@ namespace Lucene.Net._SupportClass
         [Test]
         public void Test()
         {
-            Lucene.Net.Util.Cache.SimpleLRUCache cache = new Lucene.Net.Util.Cache.SimpleLRUCache(3);
+            Lucene.Net.Util.Cache.SimpleLRUCache<string, string> cache = new Lucene.Net.Util.Cache.SimpleLRUCache<string, string>(3);
             cache.Put("a", "a");
             cache.Put("b", "b");
             cache.Put("c", "c");
@@ -1115,9 +1115,9 @@ namespace Lucene.Net._SupportClass
             Lucene.Net.Store.RAMDirectory ramDIR = new Lucene.Net.Store.RAMDirectory();
 
             //Index 1 Doc
-            Lucene.Net.Index.IndexWriter wr = new Lucene.Net.Index.IndexWriter(ramDIR, new Lucene.Net.Analysis.WhitespaceAnalyzer(), true);
+            Lucene.Net.Index.IndexWriter wr = new Lucene.Net.Index.IndexWriter(ramDIR, new Lucene.Net.Analysis.WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
             Lucene.Net.Documents.Document doc = new Lucene.Net.Documents.Document();
-            doc.Add(new Lucene.Net.Documents.Field("field1", "value1 value11", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED));
+            doc.Add(new Lucene.Net.Documents.Field("field1", "value1 value11", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.ANALYZED));
             wr.AddDocument(doc);
             wr.Close();
 
@@ -1135,15 +1135,15 @@ namespace Lucene.Net._SupportClass
             Lucene.Net.Store.RAMDirectory ramDIR2 = (Lucene.Net.Store.RAMDirectory)serializer.Deserialize(memoryStream);
 
             //Add 1 more doc
-            wr = new Lucene.Net.Index.IndexWriter(ramDIR2, new Lucene.Net.Analysis.WhitespaceAnalyzer(), false);
+            wr = new Lucene.Net.Index.IndexWriter(ramDIR2, new Lucene.Net.Analysis.WhitespaceAnalyzer(), false, IndexWriter.MaxFieldLength.UNLIMITED);
             doc = new Lucene.Net.Documents.Document();
-            doc.Add(new Lucene.Net.Documents.Field("field1", "value1 value11", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED));
+            doc.Add(new Lucene.Net.Documents.Field("field1", "value1 value11", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.ANALYZED));
             wr.AddDocument(doc);
             wr.Close();
 
             //Search
             Lucene.Net.Search.IndexSearcher s = new Lucene.Net.Search.IndexSearcher(ramDIR2);
-            Lucene.Net.QueryParsers.QueryParser qp = new Lucene.Net.QueryParsers.QueryParser("field1", new Lucene.Net.Analysis.Standard.StandardAnalyzer());
+            Lucene.Net.QueryParsers.QueryParser qp = new Lucene.Net.QueryParsers.QueryParser(Version.LUCENE_CURRENT, "field1", new Lucene.Net.Analysis.Standard.StandardAnalyzer(Version.LUCENE_CURRENT));
             Lucene.Net.Search.Query q = qp.Parse("value1");
             Lucene.Net.Search.TopDocs topDocs = s.Search(q, 100);
             s.Close();
@@ -1158,10 +1158,10 @@ namespace Lucene.Net._SupportClass
         [Description("LUCENENET-150")]
         public void Test_Index_ReusableStringReader()
         {
-            Lucene.Net.Index.IndexWriter wr = new Lucene.Net.Index.IndexWriter(new Lucene.Net.Store.RAMDirectory(), new TestAnalyzer(), true);
+            Lucene.Net.Index.IndexWriter wr = new Lucene.Net.Index.IndexWriter(new Lucene.Net.Store.RAMDirectory(), new TestAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
 
             Lucene.Net.Documents.Document doc = new Lucene.Net.Documents.Document();
-            Lucene.Net.Documents.Field f1 = new Lucene.Net.Documents.Field("f1", TEST_STRING, Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED);
+            Lucene.Net.Documents.Field f1 = new Lucene.Net.Documents.Field("f1", TEST_STRING, Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.ANALYZED);
             doc.Add(f1);
             wr.AddDocument(doc);
 
@@ -1300,17 +1300,17 @@ namespace Lucene.Net._SupportClass
 
         void LUCENENET_100_CreateIndex()
         {
-            Lucene.Net.Index.IndexWriter w = new Lucene.Net.Index.IndexWriter(LUCENENET_100_Dir, new Lucene.Net.Analysis.Standard.StandardAnalyzer(), true);
+            Lucene.Net.Index.IndexWriter w = new Lucene.Net.Index.IndexWriter(LUCENENET_100_Dir, new Lucene.Net.Analysis.Standard.StandardAnalyzer(Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
 
-            Lucene.Net.Documents.Field f1 = new Lucene.Net.Documents.Field("field1", "dark side of the moon", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED);
-            Lucene.Net.Documents.Field f2 = new Lucene.Net.Documents.Field("field2", "123", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.UN_TOKENIZED);
+            Lucene.Net.Documents.Field f1 = new Lucene.Net.Documents.Field("field1", "dark side of the moon", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.ANALYZED);
+            Lucene.Net.Documents.Field f2 = new Lucene.Net.Documents.Field("field2", "123", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.NOT_ANALYZED);
             Lucene.Net.Documents.Document d = new Lucene.Net.Documents.Document();
             d.Add(f1);
             d.Add(f2);
             w.AddDocument(d);
 
-            f1 = new Lucene.Net.Documents.Field("field1", "Fly me to the moon", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.TOKENIZED);
-            f2 = new Lucene.Net.Documents.Field("field2", "456", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.UN_TOKENIZED);
+            f1 = new Lucene.Net.Documents.Field("field1", "Fly me to the moon", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.ANALYZED);
+            f2 = new Lucene.Net.Documents.Field("field2", "456", Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.NOT_ANALYZED);
             d = new Lucene.Net.Documents.Document();
             d.Add(f1);
             d.Add(f2);

Modified: incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/UpdatedTests.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/UpdatedTests.txt?rev=1202532&r1=1202531&r2=1202532&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/UpdatedTests.txt (original)
+++ incubator/lucene.net/branches/Lucene.Net.3.0.3/trunk/test/core/UpdatedTests.txt Wed Nov 16 05:24:27 2011
@@ -68,38 +68,38 @@ index\TestIndexReaderClone.java - DONE
 index\TestIndexReaderCloneNorms.java - DONE
 index\TestIndexReaderReopen.java - DONE
 index\TestIndexWriter.java - DONE
-index\TestIndexWriterDelete.java - Text files are different
+index\TestIndexWriterDelete.java - DONE
 index\TestIndexWriterExceptions.java - Text files are different
-index\TestIndexWriterLockRelease.java - Text files are different
-index\TestIndexWriterMergePolicy.java - Text files are different
-index\TestIndexWriterMerging.java - Text files are different
-index\TestIndexWriterReader.java - Text files are different
+index\TestIndexWriterLockRelease.java - DONE
+index\TestIndexWriterMergePolicy.java - DONE
+index\TestIndexWriterMerging.java - DONE
+index\TestIndexWriterReader.java - DONE
 index\TestIsCurrent.java - Text files are different
-index\TestLazyBug.java - Text files are different
+index\TestLazyBug.java - DONE
 index\TestLazyProxSkipping.java - Text files are different
-index\TestMultiLevelSkipList.java - Text files are different
-index\TestMultiReader.java - Text files are different
+index\TestMultiLevelSkipList.java - DONE
+index\TestMultiReader.java - DONE
 index\TestNewestSegment.java - IDENTICAL
-index\TestNorms.java - Text files are different
+index\TestNorms.java - DONE
 index\TestNRTReaderWithThreads.java - Text files are different
 index\TestOmitTf.java - DONE
 index\TestParallelReader.java - Text files are different
 index\TestParallelReaderEmptyIndex.java - IDENTICAL
 index\TestParallelTermEnum.java - Text files are different
-index\TestPayloads.java - Text files are different
+index\TestPayloads.java - DONE
 index\TestPositionBasedTermVectorMapper.java - Text files are different
 index\TestRollback.java - IDENTICAL
-index\TestSegmentMerger.java - Text files are different
-index\TestSegmentReader.java - Text files are different
+index\TestSegmentMerger.java - DONE
+index\TestSegmentReader.java - DONE
 index\TestSegmentTermDocs.java - Text files are different
 index\TestSegmentTermEnum.java - Text files are different
-index\TestSnapshotDeletionPolicy.java - Text files are different
-index\TestStressIndexing.java - Text files are different
-index\TestStressIndexing2.java - Text files are different
+index\TestSnapshotDeletionPolicy.java - DONE
+index\TestStressIndexing.java - DONE
+index\TestStressIndexing2.java - DONE
 index\TestTerm.java - IDENTICAL
 index\TestTermdocPerf.java - Text files are different
-index\TestTermVectorsReader.java - Text files are different
-index\TestThreadedOptimize.java - Text files are different
+index\TestTermVectorsReader.java - DONE
+index\TestThreadedOptimize.java - DONE
 index\TestTransactionRollback.java - DONE
 index\TestTransactions.java - Text files are different
 index\TestWordlistLoader.java - IDENTICAL
@@ -110,7 +110,9 @@ messages\
 
 
 QueryParser\
-
+QueryParser\TestMultiAnalyzer.java - DONE
+QueryParser\TestMultiFieldQueryParser.java - DONE
+QueryParser\TestQueryParser.java - DONE
 
 
 search\function
@@ -170,21 +172,21 @@ search\TestFieldCacheTermsFilter.java - 
 search\TestFilteredQuery.java - Text files are different
 search\TestFilteredSearch.java - DONE
 search\TestFuzzyQuery.java - DONE
-search\TestMatchAllDocsQuery.java - Text files are different
-search\TestMultiPhraseQuery.java - Text files are different
-search\TestMultiSearcher.java - Text files are different
-search\TestMultiSearcherRanking.java - Text files are different
-search\TestMultiTermConstantScore.java - Text files are different
+search\TestMatchAllDocsQuery.java - DONE
+search\TestMultiPhraseQuery.java - DONE
+search\TestMultiSearcher.java - DONE
+search\TestMultiSearcherRanking.java - DONE
+search\TestMultiTermConstantScore.java - DONE
 search\TestMultiThreadTermVectors.java - Text files are different
 search\TestMultiValuedNumericRangeQuery.java - Text files are different
-search\TestNot.java - Text files are different
+search\TestNot.java - DONE
 search\TestNumericRangeQuery32.java - Text files are different
 search\TestNumericRangeQuery64.java - Text files are different
 search\TestParallelMultiSearcher.java - Text files are different
 search\TestPhrasePrefixQuery.java - Text files are different
-search\TestPhraseQuery.java - Text files are different
-search\TestPositionIncrement.java - Text files are different
-search\TestPositiveScoresOnlyCollector.java - DONe
+search\TestPhraseQuery.java - DONE
+search\TestPositionIncrement.java - DONE
+search\TestPositiveScoresOnlyCollector.java - DONE
 search\TestPrefixFilter.java - Text files are different
 search\TestPrefixInBooleanQuery.java - Text files are different
 search\TestPrefixQuery.java - Text files are different
@@ -192,24 +194,24 @@ search\TestQueryTermVector.java - IDENTI
 search\TestQueryWrapperFilter.java - Text files are different
 search\TestScoreCachingWrappingScorer.java - DONE
 search\TestScorerPerf.java - Text files are different
-search\TestSearchHitsWithDeletions.java - Left only: C:\SVN\apache\Lucene\lucene-2.9.4\src\test\org\apache\lucene\search
+search\TestSearchHitsWithDeletions.java - REMOVED
 search\TestSetNorm.java - Text files are different
 search\TestSimilarity.java - DONE
-search\TestSimpleExplanations.java - Text files are different
+search\TestSimpleExplanations.java - DONE
 search\TestSimpleExplanationsOfNonMatches.java - Text files are different
 search\TestSloppyPhraseQuery.java - Text files are different
 search\TestSort.java - DONE
 search\TestSpanQueryFilter.java - Text files are different
-search\TestStressSort.java - Left only: C:\SVN\apache\Lucene\lucene-2.9.4\src\test\org\apache\lucene\search
-search\TestTermRangeFilter.java - Text files are different
+search\TestStressSort.java - REMOVED
+search\TestTermRangeFilter.java - DONE
 search\TestTermRangeQuery.java - Text files are different
 search\TestTermScorer.java - Text files are different
-search\TestTermVectors.java - Text files are different
-search\TestThreadSafe.java - Text files are different
-search\TestTimeLimitedCollector.java - Left only: C:\SVN\apache\Lucene\lucene-2.9.4\src\test\org\apache\lucene\search
-search\TestTimeLimitingCollector.java - Text files are different
+search\TestTermVectors.java - DONE
+search\TestThreadSafe.java - DONE
+search\TestTimeLimitedCollector.java - REMOVED
+search\TestTimeLimitingCollector.java - DONE
 search\TestTopDocsCollector.java - Text files are different
-search\TestTopScoreDocCollector.java - Text files are different
+search\TestTopScoreDocCollector.java - DONE
 search\TestWildcard.java - Text files are different
 
 
@@ -254,5 +256,5 @@ lucene\
 TestDemo.java - DONE
 TestHitIterator.java - REMOVED
 TestMergeSchedulerExternal.java - DONE
-TestSearch.java - Text files are different
-TestSearchForDuplicates.java - Text files are different
\ No newline at end of file
+TestSearch.java - DONE
+TestSearchForDuplicates.java - DONE
\ No newline at end of file



Mime
View raw message