lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [04/28] lucenenet git commit: Lucene.Net.Misc.Sorter.EarlyTerminatingSortingCollector: renamed protected fields camelCase prefixed with m_
Date Wed, 01 Feb 2017 10:22:01 GMT
Lucene.Net.Misc.Sorter.EarlyTerminatingSortingCollector: renamed protected fields camelCase
prefixed with m_


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

Branch: refs/heads/api-work
Commit: 30f995978ec586946c54e0b4088544eefdb2c386
Parents: 81158d8
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 1 13:23:18 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 1 13:23:18 2017 +0700

----------------------------------------------------------------------
 .../Sorter/EarlyTerminatingSortingCollector.cs  | 34 ++++++++++----------
 .../Index/Sorter/TestEarlyTermination.cs        |  2 +-
 2 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/30f99597/src/Lucene.Net.Misc/Index/Sorter/EarlyTerminatingSortingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Misc/Index/Sorter/EarlyTerminatingSortingCollector.cs b/src/Lucene.Net.Misc/Index/Sorter/EarlyTerminatingSortingCollector.cs
index 1186340..2a5a6d9 100644
--- a/src/Lucene.Net.Misc/Index/Sorter/EarlyTerminatingSortingCollector.cs
+++ b/src/Lucene.Net.Misc/Index/Sorter/EarlyTerminatingSortingCollector.cs
@@ -28,7 +28,7 @@ namespace Lucene.Net.Index.Sorter
     /// <para>
     /// <b>NOTE:</b> the <see cref="ICollector"/> detects sorted segments
according to
     /// <see cref="SortingMergePolicy"/>, so it's best used in conjunction with it.
Also,
-    /// it collects up to a specified <see cref="numDocsToCollect"/> from each segment,

+    /// it collects up to a specified <see cref="m_numDocsToCollect"/> from each segment,

     /// and therefore is mostly suitable for use in conjunction with collectors such as
     /// <see cref="Search.TopDocsCollector{T}"/>, and not e.g. <see cref="TotalHitCountCollector"/>.
     /// </para>
@@ -60,19 +60,19 @@ namespace Lucene.Net.Index.Sorter
     {
         /// <summary>
         /// The wrapped Collector </summary>
-        protected internal readonly ICollector @in;
+        protected readonly ICollector m_in;
         /// <summary>
         /// Sort used to sort the search results </summary>
-        protected internal readonly Sort sort;
+        protected readonly Sort m_sort;
         /// <summary>
         /// Number of documents to collect in each segment </summary>
-        protected internal readonly int numDocsToCollect;
+        protected readonly int m_numDocsToCollect;
         /// <summary>
         /// Number of documents to collect in the current segment being processed </summary>
-        protected internal int segmentTotalCollect;
+        protected int m_segmentTotalCollect;
         /// <summary>
         /// True if the current segment being processed is sorted by <see cref="Sort()"/>
</summary>
-        protected internal bool segmentSorted;
+        protected bool m_segmentSorted;
 
         private int numCollected;
 
@@ -91,22 +91,22 @@ namespace Lucene.Net.Index.Sorter
         {
             if (numDocsToCollect <= 0)
             {
-                throw new InvalidOperationException("numDocsToCollect must always be >
0, got " + segmentTotalCollect);
+                throw new InvalidOperationException("numDocsToCollect must always be >
0, got " + m_segmentTotalCollect);
             }
-            this.@in = @in;
-            this.sort = sort;
-            this.numDocsToCollect = numDocsToCollect;
+            this.m_in = @in;
+            this.m_sort = sort;
+            this.m_numDocsToCollect = numDocsToCollect;
         }
 
         public virtual void SetScorer(Scorer scorer)
         {
-            @in.SetScorer(scorer);
+            m_in.SetScorer(scorer);
         }
 
         public virtual void Collect(int doc)
         {
-            @in.Collect(doc);
-            if (++numCollected >= segmentTotalCollect)
+            m_in.Collect(doc);
+            if (++numCollected >= m_segmentTotalCollect)
             {
                 throw new CollectionTerminatedException();
             }
@@ -114,15 +114,15 @@ namespace Lucene.Net.Index.Sorter
 
         public virtual void SetNextReader(AtomicReaderContext context)
         {
-            @in.SetNextReader(context);
-            segmentSorted = SortingMergePolicy.IsSorted(context.AtomicReader, sort);
-            segmentTotalCollect = segmentSorted ? numDocsToCollect : int.MaxValue;
+            m_in.SetNextReader(context);
+            m_segmentSorted = SortingMergePolicy.IsSorted(context.AtomicReader, m_sort);
+            m_segmentTotalCollect = m_segmentSorted ? m_numDocsToCollect : int.MaxValue;
             numCollected = 0;
         }
 
         public virtual bool AcceptsDocsOutOfOrder
         {
-            get { return !segmentSorted && @in.AcceptsDocsOutOfOrder; }
+            get { return !m_segmentSorted && m_in.AcceptsDocsOutOfOrder; }
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/30f99597/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
index f50d13d..0c1ef35 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
@@ -155,7 +155,7 @@ namespace Lucene.Net.Index.Sorter
             public override void SetNextReader(AtomicReaderContext context)
             {
                 base.SetNextReader(context);
-                assertFalse("segment should not be recognized as sorted as different sorter
was used", segmentSorted);
+                assertFalse("segment should not be recognized as sorted as different sorter
was used", m_segmentSorted);
             }
         }
 


Mime
View raw message