You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/29 13:27:37 UTC

[15/37] lucenenet git commit: Lucene.Net.Codecs.Sep (SepSkipListReader + SepSkipListWriter) refactor: IndexOptions (setter only) > SetIndexOptions(IndexOptions)

Lucene.Net.Codecs.Sep (SepSkipListReader + SepSkipListWriter) refactor: IndexOptions (setter only) > SetIndexOptions(IndexOptions)


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

Branch: refs/heads/api-work
Commit: a5cffba471ffaf06d8be898a759bab021751098c
Parents: d534f63
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:58:58 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:22 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs | 4 ++--
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs | 2 +-
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs | 7 +++----
 src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs | 4 ++--
 4 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/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 6aa63b2..60dc069 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -435,7 +435,7 @@ namespace Lucene.Net.Codecs.Sep
                     {
                         // We haven't yet skipped for this posting
                         _skipper.Init(_skipFp, _docIndex, _freqIndex, _posIndex, 0, _docFreq, _storePayloads);
-                        _skipper.IndexOptions = _indexOptions;
+                        _skipper.SetIndexOptions(_indexOptions);
 
                         _skipped = true;
                     }
@@ -610,7 +610,7 @@ namespace Lucene.Net.Codecs.Sep
                         //System.out.println("  init skip data skipFP=" + skipFP);
                         // We haven't yet skipped for this posting
                         _skipper.Init(_skipFp, _docIndex, _freqIndex, _posIndex, _payloadFp, _docFreq, _storePayloads);
-                        _skipper.IndexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+                        _skipper.SetIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
                         _skipped = true;
                     }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
index fe0a000..8489b3d 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
@@ -200,7 +200,7 @@ namespace Lucene.Net.Codecs.Sep
             {
                 throw new System.NotSupportedException("this codec cannot index offsets");
             }
-            skipListWriter.IndexOptions = indexOptions;
+            skipListWriter.SetIndexOptions(indexOptions);
             storePayloads = indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS &&
                             fieldInfo.HasPayloads;
             lastPayloadFP = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/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 210d468..fdd17e7 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -43,8 +43,6 @@ namespace Lucene.Net.Codecs.Sep
         private readonly IntIndexInput.AbstractIndex _lastDocIndex;
         private readonly IntIndexInput.AbstractIndex _lastPosIndex;
 
-        private IndexOptions _indexOptions;
-
         private long _lastPayloadPointer;
         private int _lastPayloadLength;
 
@@ -79,10 +77,11 @@ namespace Lucene.Net.Codecs.Sep
             _lastPosIndex = posIn != null ? posIn.GetIndex() : null;
         }
 
+        private IndexOptions _indexOptions;
 
-        internal virtual IndexOptions IndexOptions // LUCENENET TODO: Make into SetIndexOptions(IndexOptions)
+        internal virtual void SetIndexOptions(IndexOptions v)
         {
-            set { _indexOptions = value; }
+            _indexOptions = v;
         }
 
         internal virtual void Init(long skipPointer, IntIndexInput.AbstractIndex docBaseIndex, IntIndexInput.AbstractIndex freqBaseIndex,

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
index 30ac97b..d817d40 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
@@ -85,9 +85,9 @@ namespace Lucene.Net.Codecs.Sep
 
         private IndexOptions _indexOptions;
 
-        internal virtual IndexOptions IndexOptions // LUCENENET TODO: Make SetIndexOptions(IndexOptions v)
+        internal virtual void SetIndexOptions(IndexOptions v)
         {
-            set { _indexOptions = value; }
+            _indexOptions = v;
         }
 
         internal virtual IntIndexOutput PosOutput // LUCENENET TODO: Make SetPosOutput(IntIndexOutput posOutput)