lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1347715 - in /incubator/lucene.net/trunk: src/core/Search/IndexSearcher.cs src/core/Search/TopFieldCollector.cs test/core/Search/TestBoolean2.cs test/core/Search/TestElevationComparator.cs test/core/Search/TestSort.cs
Date Thu, 07 Jun 2012 17:05:46 GMT
Author: ccurrens
Date: Thu Jun  7 17:05:45 2012
New Revision: 1347715

URL: http://svn.apache.org/viewvc?rev=1347715&view=rev
Log:
[LUCENENET-467] - Applied patch from Luc Vanlerberghe, regarding TopFieldCollector.Create
method with lowercase name

Modified:
    incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs
    incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs
    incubator/lucene.net/trunk/test/core/Search/TestBoolean2.cs
    incubator/lucene.net/trunk/test/core/Search/TestElevationComparator.cs
    incubator/lucene.net/trunk/test/core/Search/TestSort.cs

Modified: incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs?rev=1347715&r1=1347714&r2=1347715&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs Thu Jun  7 17:05:45 2012
@@ -200,7 +200,7 @@ namespace Lucene.Net.Search
 		/// <p/>
 		/// NOTE: this does not compute scores by default. If you need scores, create
 		/// a <see cref="TopFieldCollector" /> instance by calling
-		/// <see cref="TopFieldCollector.create" /> and then pass that to
+		/// <see cref="TopFieldCollector.Create" /> and then pass that to
 		/// <see cref="Search(Weight, Filter, Collector)" />.
 		/// <p/>
 		/// </summary>
@@ -208,7 +208,7 @@ namespace Lucene.Net.Search
 		{
             nDocs = Math.Min(nDocs, reader.MaxDoc);
 
-			TopFieldCollector collector2 = TopFieldCollector.create(sort, nDocs, fillFields, fieldSortDoTrackScores,
fieldSortDoMaxScore, !weight.GetScoresDocsOutOfOrder());
+			TopFieldCollector collector2 = TopFieldCollector.Create(sort, nDocs, fillFields, fieldSortDoTrackScores,
fieldSortDoMaxScore, !weight.GetScoresDocsOutOfOrder());
 			Search(weight, filter, collector2);
 			return (TopFieldDocs) collector2.TopDocs();
 		}

Modified: incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs?rev=1347715&r1=1347714&r2=1347715&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs Thu Jun  7 17:05:45 2012
@@ -26,7 +26,7 @@ namespace Lucene.Net.Search
 	/// <summary> A <see cref="Collector" /> that sorts by <see cref="SortField"
/> using
 	/// <see cref="FieldComparator" />s.
 	/// <p/>
-    /// See the <see cref="create(Lucene.Net.Search.Sort, int, bool, bool, bool, bool)"
/> method
+    /// See the <see cref="Create" /> method
 	/// for instantiating a TopFieldCollector.
 	/// 
 	/// <p/><b>NOTE:</b> This API is experimental and might change in
@@ -1009,7 +1009,7 @@ namespace Lucene.Net.Search
 		/// the sort criteria.
 		/// </returns>
 		/// <throws>  IOException </throws>
-		public static TopFieldCollector create(Sort sort, int numHits, bool fillFields, bool trackDocScores,
bool trackMaxScore, bool docsScoredInOrder)
+		public static TopFieldCollector Create(Sort sort, int numHits, bool fillFields, bool trackDocScores,
bool trackMaxScore, bool docsScoredInOrder)
 		{
 			if (sort.fields.Length == 0)
 			{

Modified: incubator/lucene.net/trunk/test/core/Search/TestBoolean2.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestBoolean2.cs?rev=1347715&r1=1347714&r2=1347715&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestBoolean2.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestBoolean2.cs Thu Jun  7 17:05:45 2012
@@ -264,11 +264,11 @@ namespace Lucene.Net.Search
 					
 					QueryUtils.Check(q1, searcher);
 
-				    TopFieldCollector collector = TopFieldCollector.create(sort, 1000, false, true, true,
true);
+				    TopFieldCollector collector = TopFieldCollector.Create(sort, 1000, false, true, true,
true);
 				    searcher.Search(q1, null, collector);
 					ScoreDoc[] hits1 = collector.TopDocs().ScoreDocs;
 
-				    collector = TopFieldCollector.create(sort, 1000, false, true, true, false);
+				    collector = TopFieldCollector.Create(sort, 1000, false, true, true, false);
 				    searcher.Search(q1, null, collector);
 					ScoreDoc[] hits2 = collector.TopDocs().ScoreDocs;
 					tot += hits2.Length;

Modified: incubator/lucene.net/trunk/test/core/Search/TestElevationComparator.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestElevationComparator.cs?rev=1347715&r1=1347714&r2=1347715&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestElevationComparator.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestElevationComparator.cs Thu Jun  7 17:05:45
2012
@@ -74,7 +74,7 @@ namespace Lucene.Net.Search
 			
 			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);
+			TopFieldCollector topCollector = TopFieldCollector.Create(sort, 50, false, true, true,
true);
 			searcher.Search(newq, null, topCollector);
 			
 			TopDocs topDocs = topCollector.TopDocs(0, 10);

Modified: incubator/lucene.net/trunk/test/core/Search/TestSort.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestSort.cs?rev=1347715&r1=1347714&r2=1347715&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestSort.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestSort.cs Thu Jun  7 17:05:45 2012
@@ -972,7 +972,7 @@ namespace Lucene.Net.Search
 			for (int i = 0; i < sort.Length; i++)
 			{
 				Query q = new MatchAllDocsQuery();
-                TopFieldCollector tdc = TopFieldCollector.create(sort[i], 10, false, false,
false, true);
+                TopFieldCollector tdc = TopFieldCollector.Create(sort[i], 10, false, false,
false, true);
 				
 				full.Search(q, tdc);
 				
@@ -993,7 +993,7 @@ namespace Lucene.Net.Search
 			for (int i = 0; i < sort.Length; i++)
 			{
 				Query q = new MatchAllDocsQuery();
-                TopFieldCollector tdc = TopFieldCollector.create(sort[i], 10, true, false,
false, true);
+                TopFieldCollector tdc = TopFieldCollector.Create(sort[i], 10, true, false,
false, true);
 				
 				full.Search(q, tdc);
 				
@@ -1016,7 +1016,7 @@ namespace Lucene.Net.Search
 			for (int i = 0; i < sort.Length; i++)
 			{
 				Query q = new MatchAllDocsQuery();
-                TopDocsCollector<FieldValueHitQueue.Entry> tdc = TopFieldCollector.create(sort[i],
10, true, true, false, true);
+                TopDocsCollector<FieldValueHitQueue.Entry> tdc = TopFieldCollector.Create(sort[i],
10, true, true, false, true);
 				
 				full.Search(q, tdc);
 				
@@ -1039,7 +1039,7 @@ namespace Lucene.Net.Search
 			for (int i = 0; i < sort.Length; i++)
 			{
 				Query q = new MatchAllDocsQuery();
-                TopFieldCollector tdc = TopFieldCollector.create(sort[i], 10, true, true,
true, true);
+                TopFieldCollector tdc = TopFieldCollector.Create(sort[i], 10, true, true,
true, true);
 				
 				full.Search(q, tdc);
 				
@@ -1084,7 +1084,7 @@ namespace Lucene.Net.Search
             {
                 for (int j = 0; j < tfcOptions.Length; j++)
                 {
-                    TopFieldCollector tdc = TopFieldCollector.create(sort[i], 10, tfcOptions[j][0],
tfcOptions[j][1],
+                    TopFieldCollector tdc = TopFieldCollector.Create(sort[i], 10, tfcOptions[j][0],
tfcOptions[j][1],
                                                                      tfcOptions[j][2], false);
 
                     Assert.IsTrue(tdc.GetType().FullName.EndsWith("+" + actualTFCClasses[j]));
@@ -1106,7 +1106,7 @@ namespace Lucene.Net.Search
 			Sort[] sort = new Sort[]{new Sort(SortField.FIELD_DOC), new Sort()};
 			for (int i = 0; i < sort.Length; i++)
 			{
-                TopFieldCollector tdc = TopFieldCollector.create(sort[i], 10, true, true,
true, true);
+                TopFieldCollector tdc = TopFieldCollector.Create(sort[i], 10, true, true,
true, true);
 				TopDocs td = tdc.TopDocs();
 				Assert.AreEqual(0, td.TotalHits);
                 Assert.IsTrue(System.Single.IsNaN(td.MaxScore));



Mime
View raw message