lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [10/37] lucenenet git commit: Lucene.Net.Codecs.Sep.IntIndexInput refactor: Reader() > GetReader(), Index() > GetIndex()
Date Sun, 29 Jan 2017 13:27:32 GMT
Lucene.Net.Codecs.Sep.IntIndexInput refactor: Reader() > GetReader(), Index() > GetIndex()


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

Branch: refs/heads/api-work
Commit: e17cce9c9a6c959e0434b44fd9a1855589fc8c46
Parents: 7586bb8
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Jan 29 14:43:15 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Jan 29 14:44:22 2017 +0700

----------------------------------------------------------------------
 .../Bloom/BloomFilteringPostingsFormat.cs       |  3 +--
 .../Intblock/FixedIntBlockIndexInput.cs         |  4 +--
 .../Intblock/VariableIntBlockIndexInput.cs      |  4 +--
 src/Lucene.Net.Codecs/Sep/IntIndexInput.cs      |  6 ++---
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  | 28 ++++++++++----------
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs  | 12 ++++-----
 .../Codecs/MockSep/MockSingleIntIndexInput.cs   |  4 +--
 .../IntBlock/TestIntBlockCodec.cs               |  4 +--
 8 files changed, 32 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 96024a8..0da915d 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -116,8 +116,7 @@ namespace Lucene.Net.Codecs.Bloom
             {
                 throw new InvalidOperationException("Error - constructed without a choice
of PostingsFormat");
             }
-            return new BloomFilteredFieldsConsumer(
-                _delegatePostingsFormat.FieldsConsumer(state), state, this);
+            return new BloomFilteredFieldsConsumer(this, _delegatePostingsFormat.FieldsConsumer(state),
state);
         }
 
         public override FieldsProducer FieldsProducer(SegmentReadState state)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
index 9b09d6b..7b9702a 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
@@ -45,7 +45,7 @@ namespace Lucene.Net.Codecs.IntBlock
             blockSize = @in.ReadVInt();
         }
 
-        public override IntIndexInputReader Reader()
+        public override IntIndexInputReader GetReader()
         {
             var buffer = new int[blockSize];
             var clone = (IndexInput)input.Clone();
@@ -58,7 +58,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override IntIndexInputIndex Index()
+        public override IntIndexInputIndex GetIndex()
         {
             return new InputIndex(this);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index 6aaeb79..440de80 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -47,7 +47,7 @@ namespace Lucene.Net.Codecs.IntBlock
             maxBlockSize = input.ReadInt();
         }
 
-        public override IntIndexInputReader Reader()
+        public override IntIndexInputReader GetReader()
         {
             var buffer = new int[maxBlockSize];
             var clone = (IndexInput)input.Clone();
@@ -60,7 +60,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override IntIndexInputIndex Index()
+        public override IntIndexInputIndex GetIndex()
         {
             return new InputIndex(this);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
index 6c46a3c..f67abe7 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
@@ -29,9 +29,9 @@ namespace Lucene.Net.Codecs.Sep
     /// </summary>
     public abstract class IntIndexInput : IDisposable
     {
-        public abstract IntIndexInputReader Reader(); // LUCENENET TODO: Rename GetReader()
+        public abstract IntIndexInputReader GetReader();
         public abstract void Dispose();
-        public abstract IntIndexInputIndex Index(); // LUCENENET TODO: Rename GetIndex()
+        public abstract IntIndexInputIndex GetIndex();
 
       
     }
@@ -44,7 +44,7 @@ namespace Lucene.Net.Codecs.Sep
     }
 
     /// <summary>
-    /// Records a single skip-point in the <seealso cref="IntIndexInput.Reader"/>.
</summary>
+    /// Records a single skip-point in the <seealso cref="IntIndexInput.GetReader"/>.
</summary>
     public abstract class IntIndexInputIndex // LUCENENET TODO: Rename AbstractIndex and
nest within IntIndexInput
     {
         public abstract void Read(DataInput indexIn, bool absolute);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 60cbd18..5640fb2 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -189,13 +189,13 @@ namespace Lucene.Net.Codecs.Sep
 
         public override BlockTermState NewTermState()
         {
-            var state = new SepTermState {DOC_INDEX = _docIn.Index()};
+            var state = new SepTermState {DOC_INDEX = _docIn.GetIndex()};
 
             if (_freqIn != null)
-                state.FREQ_INDEX = _freqIn.Index();
+                state.FREQ_INDEX = _freqIn.GetIndex();
 
             if (_posIn != null)
-                state.POS_INDEX = _posIn.Index();
+                state.POS_INDEX = _posIn.GetIndex();
 
             return state;
         }
@@ -326,19 +326,19 @@ namespace Lucene.Net.Codecs.Sep
             internal SepDocsEnum(SepPostingsReader outerInstance)
             {
                 _outerInstance = outerInstance;
-                _docReader = outerInstance._docIn.Reader();
-                _docIndex = outerInstance._docIn.Index();
+                _docReader = outerInstance._docIn.GetReader();
+                _docIndex = outerInstance._docIn.GetIndex();
                 if (outerInstance._freqIn != null)
                 {
-                    _freqReader = outerInstance._freqIn.Reader();
-                    _freqIndex = outerInstance._freqIn.Index();
+                    _freqReader = outerInstance._freqIn.GetReader();
+                    _freqIndex = outerInstance._freqIn.GetIndex();
                 }
                 else
                 {
                     _freqReader = null;
                     _freqIndex = null;
                 }
-                _posIndex = outerInstance._posIn != null ? outerInstance._posIn.Index() :
null;
+                _posIndex = outerInstance._posIn != null ? outerInstance._posIn.GetIndex()
: null;
 
                 START_DOC_IN = outerInstance._docIn;
             }
@@ -512,12 +512,12 @@ namespace Lucene.Net.Codecs.Sep
             internal SepDocsAndPositionsEnum(SepPostingsReader outerInstance)
             {
                 _outerInstance = outerInstance;
-                _docReader = outerInstance._docIn.Reader();
-                _docIndex = outerInstance._docIn.Index();
-                _freqReader = outerInstance._freqIn.Reader();
-                _freqIndex = outerInstance._freqIn.Index();
-                _posReader = outerInstance._posIn.Reader();
-                _posIndex = outerInstance._posIn.Index();
+                _docReader = outerInstance._docIn.GetReader();
+                _docIndex = outerInstance._docIn.GetIndex();
+                _freqReader = outerInstance._freqIn.GetReader();
+                _freqIndex = outerInstance._freqIn.GetIndex();
+                _posReader = outerInstance._posIn.GetReader();
+                _posIndex = outerInstance._posIn.GetIndex();
                 _payloadIn = (IndexInput) outerInstance._payloadIn.Clone();
 
                 START_DOC_IN = outerInstance._docIn;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
index 1491df4..40951f7 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -63,20 +63,20 @@ namespace Lucene.Net.Codecs.Sep
             for (var i = 0; i < maxSkipLevels; i++)
             {
                 if (freqIn != null)
-                    _freqIndex[i] = freqIn.Index();
+                    _freqIndex[i] = freqIn.GetIndex();
 
-                _docIndex[i] = docIn.Index();
+                _docIndex[i] = docIn.GetIndex();
 
                 if (posIn != null)
-                    _posIndex[i] = posIn.Index();
+                    _posIndex[i] = posIn.GetIndex();
             }
 
             _payloadPointer = new long[maxSkipLevels];
             _payloadLength = new int[maxSkipLevels];
 
-            _lastFreqIndex = freqIn != null ? freqIn.Index() : null;
-            _lastDocIndex = docIn.Index();
-            _lastPosIndex = posIn != null ? posIn.Index() : null;
+            _lastFreqIndex = freqIn != null ? freqIn.GetIndex() : null;
+            _lastDocIndex = docIn.GetIndex();
+            _lastPosIndex = posIn != null ? posIn.GetIndex() : null;
         }
 
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
index 6d28cc5..55f257a 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.MockSep
                           MockSingleIntIndexOutput.VERSION_START);
         }
 
-        public override IntIndexInputReader Reader()
+        public override IntIndexInputReader GetReader()
         {
             return new MockReader((IndexInput)@in.Clone());
         }
@@ -110,7 +110,7 @@ namespace Lucene.Net.Codecs.MockSep
                 return other;
             }
         }
-        public override IntIndexInputIndex Index()
+        public override IntIndexInputIndex GetIndex()
         {
             return new MockSingleIntIndexInputIndex();
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
index f84ac9a..aef9339 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.IntBlock
             @out.Dispose();
 
             IntIndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
-            IntIndexInputReader r = @in.Reader();
+            IntIndexInputReader r = @in.GetReader();
 
             for (int i = 0; i < 11777; i++)
             {
@@ -63,7 +63,7 @@ namespace Lucene.Net.Codecs.IntBlock
             @out.Dispose();
 
             IntIndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
-            @in.Reader();
+            @in.GetReader();
             // read no ints
             @in.Dispose();
             dir.Dispose();


Mime
View raw message