lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [04/12] lucenenet git commit: Lucene.Net.Join: Renamed fields from PascalCase to camelCase
Date Thu, 26 Jan 2017 14:38:02 GMT
Lucene.Net.Join: Renamed fields from PascalCase to camelCase


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

Branch: refs/heads/api-work
Commit: 720fe70c7fccaa0c90c2380c2bbf684d3da4bfde
Parents: 7f474fd
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Jan 26 19:52:31 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Jan 26 19:52:31 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Join/TermsIncludingScoreQuery.cs | 16 +++++------
 src/Lucene.Net.Join/TermsQuery.cs               | 16 +++++------
 src/Lucene.Net.Join/ToParentBlockJoinQuery.cs   | 28 ++++++++++----------
 .../ToParentBlockJoinSortField.cs               | 24 ++++++++---------
 4 files changed, 42 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/720fe70c/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs b/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
index 5a26954..ee45f3a 100644
--- a/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
+++ b/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
@@ -222,7 +222,7 @@ namespace Lucene.Net.Join
             private readonly long _cost;
 
             private int _upto;
-            internal DocsEnum DocsEnum;
+            internal DocsEnum docsEnum;
             private DocsEnum _reuse;
             private int _scoreUpto;
             private int _doc;
@@ -259,12 +259,12 @@ namespace Lucene.Net.Join
             {
                 while (true)
                 {
-                    if (DocsEnum != null)
+                    if (docsEnum != null)
                     {
                         int docId = DocsEnumNextDoc();
                         if (docId == DocIdSetIterator.NO_MORE_DOCS)
                         {
-                            DocsEnum = null;
+                            docsEnum = null;
                         }
                         else
                         {
@@ -280,14 +280,14 @@ namespace Lucene.Net.Join
                     _scoreUpto = _upto;
                     if (_termsEnum.SeekExact(outerInstance._terms.Get(outerInstance._ords[_upto++],
_spare)))
                     {
-                        DocsEnum = _reuse = _termsEnum.Docs(_acceptDocs, _reuse, DocsEnum.FLAG_NONE);
+                        docsEnum = _reuse = _termsEnum.Docs(_acceptDocs, _reuse, DocsEnum.FLAG_NONE);
                     }
                 }
             }
             
             protected virtual int DocsEnumNextDoc()
             {
-                return DocsEnum.NextDoc();
+                return docsEnum.NextDoc();
             }
             
             internal Explanation Explain(int target) // LUCENENET NOTE: changed accessibility
from private to internal
@@ -298,7 +298,7 @@ namespace Lucene.Net.Join
                     docId = NextDocOutOfOrder();
                     if (docId < target)
                     {
-                        int tempDocId = DocsEnum.Advance(target);
+                        int tempDocId = docsEnum.Advance(target);
                         if (tempDocId == target)
                         {
                             docId = tempDocId;
@@ -309,7 +309,7 @@ namespace Lucene.Net.Join
                     {
                         break;
                     }
-                    DocsEnum = null; // goto the next ord.
+                    docsEnum = null; // goto the next ord.
                 } while (docId != DocIdSetIterator.NO_MORE_DOCS);
 
                 return new ComplexExplanation(true, outerInstance._scores[outerInstance._ords[_scoreUpto]],
@@ -339,7 +339,7 @@ namespace Lucene.Net.Join
             {
                 while (true)
                 {
-                    int docId = DocsEnum.NextDoc();
+                    int docId = docsEnum.NextDoc();
                     if (docId == DocIdSetIterator.NO_MORE_DOCS)
                     {
                         return docId;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/720fe70c/src/Lucene.Net.Join/TermsQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/TermsQuery.cs b/src/Lucene.Net.Join/TermsQuery.cs
index e3a066c..a869c9a 100644
--- a/src/Lucene.Net.Join/TermsQuery.cs
+++ b/src/Lucene.Net.Join/TermsQuery.cs
@@ -68,8 +68,8 @@ namespace Lucene.Net.Join
 
         private class SeekingTermSetTermsEnum : FilteredTermsEnum
         {
-            private readonly BytesRefHash Terms;
-            private readonly int[] Ords;
+            private readonly BytesRefHash terms;
+            private readonly int[] ords;
             private readonly int _lastElement;
 
             private readonly BytesRef _lastTerm;
@@ -82,8 +82,8 @@ namespace Lucene.Net.Join
             internal SeekingTermSetTermsEnum(TermsEnum tenum, BytesRefHash terms, int[] ords)

                 : base(tenum)
             {
-                this.Terms = terms;
-                this.Ords = ords;
+                this.terms = terms;
+                this.ords = ords;
                 _comparer = BytesRef.UTF8SortedAsUnicodeComparer;
                 _lastElement = terms.Count - 1;
                 _lastTerm = terms.Get(ords[_lastElement], new BytesRef());
@@ -104,7 +104,7 @@ namespace Lucene.Net.Join
                     return AcceptStatus.END;
                 }
 
-                BytesRef currentTerm = Terms.Get(Ords[_upto], _spare);
+                BytesRef currentTerm = terms.Get(ords[_upto], _spare);
                 if (_comparer.Compare(term, currentTerm) == 0)
                 {
                     if (_upto == _lastElement)
@@ -112,7 +112,7 @@ namespace Lucene.Net.Join
                         return AcceptStatus.YES;
                     }
 
-                    _seekTerm = Terms.Get(Ords[++_upto], _spare);
+                    _seekTerm = terms.Get(ords[++_upto], _spare);
                     return AcceptStatus.YES_AND_SEEK;
                 }
 
@@ -130,7 +130,7 @@ namespace Lucene.Net.Join
                     }
                     // typically the terms dict is a superset of query's terms so it's unusual
that we have to skip many of
                     // our terms so we don't do a binary search here
-                    _seekTerm = Terms.Get(Ords[++_upto], _spare);
+                    _seekTerm = terms.Get(ords[++_upto], _spare);
                 } while ((cmp = _comparer.Compare(_seekTerm, term)) < 0);
                 if (cmp == 0)
                 {
@@ -138,7 +138,7 @@ namespace Lucene.Net.Join
                     {
                         return AcceptStatus.YES;
                     }
-                    _seekTerm = Terms.Get(Ords[++_upto], _spare);
+                    _seekTerm = terms.Get(ords[++_upto], _spare);
                     return AcceptStatus.YES_AND_SEEK;
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/720fe70c/src/Lucene.Net.Join/ToParentBlockJoinQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/ToParentBlockJoinQuery.cs b/src/Lucene.Net.Join/ToParentBlockJoinQuery.cs
index 1b802ac..c0f9ebe 100644
--- a/src/Lucene.Net.Join/ToParentBlockJoinQuery.cs
+++ b/src/Lucene.Net.Join/ToParentBlockJoinQuery.cs
@@ -115,40 +115,40 @@ namespace Lucene.Net.Join
 
         private class BlockJoinWeight : Weight
         {
-            private readonly Query JoinQuery;
-            private readonly Weight ChildWeight;
-            private readonly Filter ParentsFilter;
-            private readonly ScoreMode ScoreMode;
+            private readonly Query joinQuery;
+            private readonly Weight childWeight;
+            private readonly Filter parentsFilter;
+            private readonly ScoreMode scoreMode;
 
             public BlockJoinWeight(Query joinQuery, Weight childWeight, Filter parentsFilter,
ScoreMode scoreMode) 
                 : base()
             {
-                this.JoinQuery = joinQuery;
-                this.ChildWeight = childWeight;
-                this.ParentsFilter = parentsFilter;
-                this.ScoreMode = scoreMode;
+                this.joinQuery = joinQuery;
+                this.childWeight = childWeight;
+                this.parentsFilter = parentsFilter;
+                this.scoreMode = scoreMode;
             }
 
             public override Query Query
             {
-                get { return JoinQuery; }
+                get { return joinQuery; }
             }
             
             public override float GetValueForNormalization()
             {
-                return ChildWeight.GetValueForNormalization() * JoinQuery.Boost*JoinQuery.Boost;
+                return childWeight.GetValueForNormalization() * joinQuery.Boost*joinQuery.Boost;
             }
 
             public override void Normalize(float norm, float topLevelBoost)
             {
-                ChildWeight.Normalize(norm, topLevelBoost * JoinQuery.Boost);
+                childWeight.Normalize(norm, topLevelBoost * joinQuery.Boost);
             }
 
             // NOTE: acceptDocs applies (and is checked) only in the parent document space
             public override Scorer GetScorer(AtomicReaderContext readerContext, IBits acceptDocs)
             {
 
-                Scorer childScorer = ChildWeight.GetScorer(readerContext, readerContext.AtomicReader.LiveDocs);
+                Scorer childScorer = childWeight.GetScorer(readerContext, readerContext.AtomicReader.LiveDocs);
                 if (childScorer == null)
                 {
                     // No matches
@@ -167,7 +167,7 @@ namespace Lucene.Net.Join
                 // not return a FixedBitSet but rather a
                 // BitsFilteredDocIdSet.  Instead, we filter by
                 // acceptDocs when we score:
-                DocIdSet parents = ParentsFilter.GetDocIdSet(readerContext, null);
+                DocIdSet parents = parentsFilter.GetDocIdSet(readerContext, null);
 
                 if (parents == null)
                 {
@@ -179,7 +179,7 @@ namespace Lucene.Net.Join
                     throw new InvalidOperationException("parentFilter must return FixedBitSet;
got " + parents);
                 }
 
-                return new BlockJoinScorer(this, childScorer, (FixedBitSet)parents, firstChildDoc,
ScoreMode, acceptDocs);
+                return new BlockJoinScorer(this, childScorer, (FixedBitSet)parents, firstChildDoc,
scoreMode, acceptDocs);
             }
             
             public override Explanation Explain(AtomicReaderContext context, int doc)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/720fe70c/src/Lucene.Net.Join/ToParentBlockJoinSortField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/ToParentBlockJoinSortField.cs b/src/Lucene.Net.Join/ToParentBlockJoinSortField.cs
index 736e1bb..caf9871 100644
--- a/src/Lucene.Net.Join/ToParentBlockJoinSortField.cs
+++ b/src/Lucene.Net.Join/ToParentBlockJoinSortField.cs
@@ -27,9 +27,9 @@ namespace Lucene.Net.Join
 	/// </summary>
 	public class ToParentBlockJoinSortField : SortField
     {
-        private readonly bool Order;
-        private readonly Filter ParentFilter;
-        private readonly Filter ChildFilter;
+        private readonly bool order;
+        private readonly Filter parentFilter;
+        private readonly Filter childFilter;
 
         /// <summary>
         /// Create ToParentBlockJoinSortField. The parent document ordering is based on child
document ordering (reverse).
@@ -42,9 +42,9 @@ namespace Lucene.Net.Join
         public ToParentBlockJoinSortField(string field, SortFieldType type, bool reverse,
Filter parentFilter, Filter childFilter) 
             : base(field, type, reverse)
         {
-            this.Order = reverse;
-            this.ParentFilter = parentFilter;
-            this.ChildFilter = childFilter;
+            this.order = reverse;
+            this.parentFilter = parentFilter;
+            this.childFilter = childFilter;
         }
 
         /// <summary>
@@ -59,20 +59,20 @@ namespace Lucene.Net.Join
         public ToParentBlockJoinSortField(string field, SortFieldType type, bool reverse,
bool order, Filter parentFilter, Filter childFilter) 
             : base(field, type, reverse)
         {
-            Order = order;
-            ParentFilter = parentFilter;
-            ChildFilter = childFilter;
+            this.order = order;
+            this.parentFilter = parentFilter;
+            this.childFilter = childFilter;
         }
         
         public override FieldComparer GetComparer(int numHits, int sortPos)
         {
             var wrappedFieldComparer = base.GetComparer(numHits + 1, sortPos);
-            if (Order)
+            if (order)
             {
-                return new ToParentBlockJoinFieldComparer.Highest(wrappedFieldComparer, ParentFilter,
ChildFilter, numHits);
+                return new ToParentBlockJoinFieldComparer.Highest(wrappedFieldComparer, parentFilter,
childFilter, numHits);
             }
 
-            return new ToParentBlockJoinFieldComparer.Lowest(wrappedFieldComparer, ParentFilter,
ChildFilter, numHits);
+            return new ToParentBlockJoinFieldComparer.Lowest(wrappedFieldComparer, parentFilter,
childFilter, numHits);
         }
     }
 }
\ No newline at end of file


Mime
View raw message