You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2011/05/07 20:12:18 UTC

[Lucene.Net] svn commit: r1100582 - in /incubator/lucene.net/branches/Lucene.Net_2_9_4g: src/core/Search/TopDocs.cs test/core/Search/Regex/TestRegexpQuery.cs

Author: digy
Date: Sat May  7 18:12:18 2011
New Revision: 1100582

URL: http://svn.apache.org/viewvc?rev=1100582&view=rev
Log:
LUCENENET-412 Since we are at a point of loosing "drop-in replacement" we are free to make the changes related with TopDocs

>From David Smith's eMail:
>Morning,
>
>I checked out and compiled
>https://svn.apache.org/repos/asf/incubator/lucene.net/trunk yesterday, looking to update from 2.0.0.4
>
>To get the library to work with VB.Net I found I had to edit TopDocs.cs (src/core/Search/TopDocs.cs).
>Being case-insensitive VB.Net can't differentiate between the three public variables (totalHits, scoreDocs & maxScore) and the three >public properties (TotalHits, ScoreDocs & MaxScore)
>
>David

Modified:
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/TopDocs.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Regex/TestRegexpQuery.cs

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/TopDocs.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/TopDocs.cs?rev=1100582&r1=1100581&r2=1100582&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/TopDocs.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/TopDocs.cs Sat May  7 18:12:18 2011
@@ -30,14 +30,11 @@ namespace Lucene.Net.Search
 		/// <summary>The total number of hits for the query.</summary>
 		/// <seealso cref="Hits.Length()">
 		/// </seealso>
-        [Obsolete("For backward compatibility. Use TotalHits instead")]
-		public int totalHits;
+		int totalHits;
 		/// <summary>The top hits for the query. </summary>
-        [Obsolete("For backward compatibility. Use ScoreDocs instead")]
-		public ScoreDoc[] scoreDocs;
+		ScoreDoc[] scoreDocs;
 		/// <summary>Stores the maximum score value encountered, needed for normalizing. </summary>
-        [Obsolete("For backward compatibility. Use MaxScore instead")]
-		private float maxScore;
+		float maxScore;
 
         public int TotalHits
         {

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Regex/TestRegexpQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Regex/TestRegexpQuery.cs?rev=1100582&r1=1100581&r2=1100582&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Regex/TestRegexpQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Regex/TestRegexpQuery.cs Sat May  7 18:12:18 2011
@@ -66,7 +66,7 @@ namespace Lucene.Net.Search.Regex
         private int GetRegexQueryHitsCount(string sRegex)
         {
             RegexQuery query = new RegexQuery(NewTerm(sRegex));
-            return _searcher.Search(query, 5).totalHits;
+            return _searcher.Search(query, 5).TotalHits;
         }
 
         [Test]