lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [05/38] lucenenet git commit: API: Lucene.Net.Search.Similarites.BasicStats: Changed m_field to private and renamed field, made Field property non-virtual.
Date Thu, 22 Jun 2017 05:25:06 GMT
API: Lucene.Net.Search.Similarites.BasicStats: Changed m_field to private and renamed field,
made Field property non-virtual.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f77728b2
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f77728b2
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f77728b2

Branch: refs/heads/master
Commit: f77728b25d28483c7b490d12e9158f217784b6c3
Parents: 169598c
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Jun 17 13:08:51 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Jun 17 13:08:51 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net/Search/Similarities/BasicStats.cs     | 12 ++++++++----
 src/Lucene.Net/Search/Similarities/SimilarityBase.cs |  4 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f77728b2/src/Lucene.Net/Search/Similarities/BasicStats.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicStats.cs b/src/Lucene.Net/Search/Similarities/BasicStats.cs
index 0c534bb..e16fdec 100644
--- a/src/Lucene.Net/Search/Similarities/BasicStats.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicStats.cs
@@ -29,7 +29,7 @@ namespace Lucene.Net.Search.Similarities
 #endif
     public class BasicStats : Similarity.SimWeight
     {
-        protected internal readonly string m_field; // LUCENENET TODO: API This was internal
in Lucene
+        private readonly string field;
 
         /// <summary>
         /// The number of documents. </summary>
@@ -72,7 +72,7 @@ namespace Lucene.Net.Search.Similarities
         /// Constructor. Sets the query boost. </summary>
         public BasicStats(string field, float queryBoost)
         {
-            this.m_field = field;
+            this.field = field;
             this.m_queryBoost = queryBoost;
             this.m_totalBoost = queryBoost;
         }
@@ -150,9 +150,13 @@ namespace Lucene.Net.Search.Similarities
             }
         }
 
-        public virtual string Field // LUCENENET TODO: API - eliminate and use internal field
instead
+        /// <summary>
+        /// The field.
+        /// </summary>
+        // LUCENENET specific
+        public string Field
         {
-            get { return m_field; }
+            get { return field; }
         }
 
         // -------------------------- Boost-related stuff --------------------------

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f77728b2/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/SimilarityBase.cs b/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
index 744db3f..68ba97a 100644
--- a/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
+++ b/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
@@ -212,14 +212,14 @@ namespace Lucene.Net.Search.Similarities
                 for (int i = 0; i < subScorers.Length; i++)
                 {
                     BasicStats basicstats = (BasicStats)subStats[i];
-                    subScorers[i] = new BasicSimScorer(this, basicstats, context.AtomicReader.GetNormValues(basicstats.m_field));
+                    subScorers[i] = new BasicSimScorer(this, basicstats, context.AtomicReader.GetNormValues(basicstats.Field));
                 }
                 return new MultiSimilarity.MultiSimScorer(subScorers);
             }
             else
             {
                 BasicStats basicstats = (BasicStats)stats;
-                return new BasicSimScorer(this, basicstats, context.AtomicReader.GetNormValues(basicstats.m_field));
+                return new BasicSimScorer(this, basicstats, context.AtomicReader.GetNormValues(basicstats.Field));
             }
         }
 


Mime
View raw message