lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [07/37] lucenenet git commit: Lucene.Net.Codecs refactor: renamed all outer instance fields to outerInstance and moved them to the beginning of the constructor parameter list.
Date Sun, 29 Jan 2017 13:27:29 GMT
Lucene.Net.Codecs refactor: renamed all outer instance fields to outerInstance and moved them
to the beginning of the constructor parameter list.


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

Branch: refs/heads/api-work
Commit: 9b5fd73016290b6ca456d170009970fc91c66f64
Parents: 8bdeedc
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Jan 29 14:35:06 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Jan 29 14:35:06 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/BlockTermsWriter.cs              | 36 ++++++++++----------
 .../BlockTerms/FixedGapTermsIndexReader.cs      | 21 +++++-------
 .../BlockTerms/FixedGapTermsIndexWriter.cs      | 27 +++++++--------
 .../BlockTerms/VariableGapTermsIndexReader.cs   | 21 ++++++------
 .../BlockTerms/VariableGapTermsIndexWriter.cs   | 17 +++++----
 .../Bloom/BloomFilteringPostingsFormat.cs       | 17 +++++----
 6 files changed, 66 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index 81411a7..17d0b30 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -120,7 +120,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             CurrentField = field;
             var fiw = _termsIndexWriter.AddField(field, _output.FilePointer);
-            return new TermsWriter(fiw, field, PostingsWriter, this);
+            return new TermsWriter(this, fiw, field, PostingsWriter);
         }
 
         public override void Dispose()
@@ -173,8 +173,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         internal class TermsWriter : TermsConsumer
         {
-            // Outer instance
-            private readonly BlockTermsWriter _btw;
+            private readonly BlockTermsWriter outerInstance;
 
             private readonly FieldInfo _fieldInfo;
             private readonly PostingsWriterBase _postingsWriter;
@@ -191,20 +190,21 @@ namespace Lucene.Net.Codecs.BlockTerms
             private int _pendingCount;
 
             internal TermsWriter(
+                BlockTermsWriter outerInstance,
                 TermsIndexWriterBase.FieldWriter fieldIndexWriter,
                 FieldInfo fieldInfo,
-                PostingsWriterBase postingsWriter, BlockTermsWriter btw)
+                PostingsWriterBase postingsWriter)
             {
+                this.outerInstance = outerInstance;
                 _fieldInfo = fieldInfo;
                 _fieldIndexWriter = fieldIndexWriter;
-                _btw = btw;
 
                 _pendingTerms = new TermEntry[32];
                 for (int i = 0; i < _pendingTerms.Length; i++)
                 {
                     _pendingTerms[i] = new TermEntry();
                 }
-                _termsStartPointer = _btw._output.FilePointer;
+                _termsStartPointer = this.outerInstance._output.FilePointer;
                 _postingsWriter = postingsWriter;
                 _longsSize = postingsWriter.SetField(fieldInfo);
             }
@@ -237,7 +237,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                         // entire block in between index terms:
                         FlushBlock();
                     }
-                    _fieldIndexWriter.Add(text, stats, _btw._output.FilePointer);
+                    _fieldIndexWriter.Add(text, stats, outerInstance._output.FilePointer);
                 }
 
                 if (_pendingTerms.Length == _pendingCount)
@@ -271,16 +271,16 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
 
                 // EOF marker:
-                _btw._output.WriteVInt(0);
+                outerInstance._output.WriteVInt(0);
 
                 _sumTotalTermFreq = sumTotalTermFreq;
                 _sumDocFreq = sumDocFreq;
                 _docCount = docCount;
-                _fieldIndexWriter.Finish(_btw._output.FilePointer);
+                _fieldIndexWriter.Finish(outerInstance._output.FilePointer);
 
                 if (_numTerms > 0)
                 {
-                    _btw._fields.Add(new FieldMetaData(_fieldInfo,
+                    outerInstance._fields.Add(new FieldMetaData(_fieldInfo,
                         _numTerms,
                         _termsStartPointer,
                         sumTotalTermFreq,
@@ -329,8 +329,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                             _pendingTerms[termCount].Term));
                 }
 
-                _btw._output.WriteVInt(_pendingCount);
-                _btw._output.WriteVInt(commonPrefix);
+                outerInstance._output.WriteVInt(_pendingCount);
+                outerInstance._output.WriteVInt(commonPrefix);
 
                 // 2nd pass: write suffixes, as separate byte[] blob
                 for (var termCount = 0; termCount < _pendingCount; termCount++)
@@ -341,8 +341,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _bytesWriter.WriteVInt(suffix);
                     _bytesWriter.WriteBytes(_pendingTerms[termCount].Term.Bytes, commonPrefix,
suffix);
                 }
-                _btw._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(_btw._output);
+                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance._output);
                 _bytesWriter.Reset();
 
                 // 3rd pass: write the freqs as byte[] blob
@@ -360,8 +360,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                         _bytesWriter.WriteVLong(state.TotalTermFreq - state.DocFreq);
                     }
                 }
-                _btw._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(_btw._output);
+                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance._output);
                 _bytesWriter.Reset();
 
                 // 4th pass: write the metadata 
@@ -379,8 +379,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _bufferWriter.Reset();
                     absolute = false;
                 }
-                _btw._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(_btw._output);
+                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance._output);
                 _bytesWriter.Reset();
 
                 _lastPrevTerm.CopyBytes(_pendingTerms[_pendingCount - 1].Term);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 8804803..01813cf 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -143,8 +143,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     try
                     {
                         _fields.Add(fieldInfo,
-                            new FieldIndexData(numIndexTerms, indexStart, termsStart, packedIndexStart,
-                                packedOffsetsStart, this));
+                            new FieldIndexData(this, numIndexTerms, indexStart, termsStart,
packedIndexStart,
+                                packedOffsetsStart));
                     }
                     catch (ArgumentException)
                     {
@@ -299,8 +299,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class FieldIndexData
         {
-            // Outer instance
-            private readonly FixedGapTermsIndexReader _fgtir; // LUCENENET TODO: In this
assembly, change all variables marked "Outer instance" to be named outerInstance and move
them to the beginning of the ctor parameter list
+            private readonly FixedGapTermsIndexReader outerInstance;
 
             internal volatile CoreFieldIndex CoreIndex;
 
@@ -311,19 +310,17 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private readonly int _numIndexTerms;
             
-            public FieldIndexData(int numIndexTerms, long indexStart, long termsStart,
-                long packedIndexStart,
-                long packedOffsetsStart, FixedGapTermsIndexReader fgtir)
+            public FieldIndexData(FixedGapTermsIndexReader outerInstance, int numIndexTerms,
long indexStart, long termsStart,
+                long packedIndexStart, long packedOffsetsStart)
             {
-
+                this.outerInstance = outerInstance;
                 _termsStart = termsStart;
                 _indexStart = indexStart;
                 _packedIndexStart = packedIndexStart;
                 _packedOffsetsStart = packedOffsetsStart;
                 _numIndexTerms = numIndexTerms;
-                _fgtir = fgtir;
-
-                if (_fgtir._indexDivisor > 0)
+                
+                if (this.outerInstance._indexDivisor > 0)
                     LoadTermsIndex();
             }
 
@@ -331,7 +328,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 if (CoreIndex == null)
                     CoreIndex = new CoreFieldIndex(_indexStart, _termsStart, _packedIndexStart,
_packedOffsetsStart,
-                        _numIndexTerms, _fgtir);
+                        _numIndexTerms, outerInstance);
             }
 
             internal class CoreFieldIndex

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
index 74b55d7..74ba41d 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
@@ -83,7 +83,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         public override FieldWriter AddField(FieldInfo field, long termsFilePointer)
         {
-            var writer = new SimpleFieldWriter(field, termsFilePointer, this);
+            var writer = new SimpleFieldWriter(this, field, termsFilePointer);
             _fields.Add(writer);
             return writer;
         }
@@ -113,8 +113,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class SimpleFieldWriter : FieldWriter
         {
-            // Outer instance
-            private readonly FixedGapTermsIndexWriter _fgtiw;
+            private readonly FixedGapTermsIndexWriter outerInstance;
 
             internal readonly FieldInfo FieldInfo;
             internal int NumIndexTerms;
@@ -134,26 +133,26 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private readonly BytesRef _lastTerm = new BytesRef();
 
-            internal SimpleFieldWriter(FieldInfo fieldInfo, long termsFilePointer, FixedGapTermsIndexWriter
fgtiw)
+            internal SimpleFieldWriter(FixedGapTermsIndexWriter outerInstance, FieldInfo
fieldInfo, long termsFilePointer)
             {
+                this.outerInstance = outerInstance;
                 FieldInfo = fieldInfo;
-                IndexStart = fgtiw.Output.FilePointer;
+                IndexStart = outerInstance.Output.FilePointer;
                 TermsStart = _lastTermsPointer = termsFilePointer;
                 _termLengths = new short[0];
                 _termsPointerDeltas = new int[0];
-                _fgtiw = fgtiw;
             }
 
             public override bool CheckIndexTerm(BytesRef text, TermStats stats)
             {
                 // First term is first indexed term:
                 //System.output.println("FGW: checkIndexTerm text=" + text.utf8ToString());
-                if (0 == (_numTerms++ % _fgtiw._termIndexInterval))
+                if (0 == (_numTerms++ % outerInstance._termIndexInterval))
                     return true;
 
                 // save last term just before next index term so we
                 // can compute wasted suffix
-                if (0 == _numTerms % _fgtiw._termIndexInterval)
+                if (0 == _numTerms % outerInstance._termIndexInterval)
                     _lastTerm.CopyBytes(text);
 
                 return false;
@@ -161,11 +160,11 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             public override void Add(BytesRef text, TermStats stats, long termsFilePointer)
             {
-                int indexedTermLength = _fgtiw.IndexedTermPrefixLength(_lastTerm, text);
+                int indexedTermLength = outerInstance.IndexedTermPrefixLength(_lastTerm,
text);
 
                 // write only the min prefix that shows the diff
                 // against prior term
-                _fgtiw.Output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
+                outerInstance.Output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
 
                 if (_termLengths.Length == NumIndexTerms)
                 {
@@ -192,9 +191,9 @@ namespace Lucene.Net.Codecs.BlockTerms
             public override void Finish(long termsFilePointer)
             {
                 // write primary terms dict offsets
-                PackedIndexStart = _fgtiw.Output.FilePointer;
+                PackedIndexStart = outerInstance.Output.FilePointer;
 
-                PackedInts.Writer w = PackedInts.GetWriter(_fgtiw.Output, NumIndexTerms,
+                PackedInts.Writer w = PackedInts.GetWriter(outerInstance.Output, NumIndexTerms,
                     PackedInts.BitsRequired(termsFilePointer),
                     PackedInts.DEFAULT);
 
@@ -207,10 +206,10 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
                 w.Finish();
 
-                PackedOffsetsStart = _fgtiw.Output.FilePointer;
+                PackedOffsetsStart = outerInstance.Output.FilePointer;
 
                 // write offsets into the byte[] terms
-                w = PackedInts.GetWriter(_fgtiw.Output, 1 + NumIndexTerms, PackedInts.BitsRequired(_totTermLength),
+                w = PackedInts.GetWriter(outerInstance.Output, 1 + NumIndexTerms, PackedInts.BitsRequired(_totTermLength),
                     PackedInts.DEFAULT);
                 upto = 0;
                 for (int i = 0; i < NumIndexTerms; i++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index f6dc09d..227c37b 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -85,7 +85,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     
                     try
                     {
-                        _fields.Add(fieldInfo, new FieldIndexData(indexStart, this));
+                        _fields.Add(fieldInfo, new FieldIndexData(this, indexStart));
                     }
                     catch (ArgumentException)
                     {
@@ -173,19 +173,18 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class FieldIndexData
         {
-            // Outer instance
-            private readonly VariableGapTermsIndexReader _vgtir;
+            private readonly VariableGapTermsIndexReader outerInstance;
 
             private readonly long _indexStart;
             // Set only if terms index is loaded:
             internal volatile FST<long?> Fst;
             
-            public FieldIndexData(long indexStart, VariableGapTermsIndexReader vgtir)
+            public FieldIndexData(VariableGapTermsIndexReader outerInstance, long indexStart)
             {
-                _vgtir = vgtir;
+                this.outerInstance = outerInstance;
                 _indexStart = indexStart;
 
-                if (_vgtir._indexDivisor > 0)
+                if (this.outerInstance._indexDivisor > 0)
                     LoadTermsIndex();
             }
 
@@ -193,9 +192,9 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 if (Fst != null) return;
 
-                var clone = (IndexInput)_vgtir._input.Clone();
+                var clone = (IndexInput)outerInstance._input.Clone();
                 clone.Seek(_indexStart);
-                Fst = new FST<long?>(clone, _vgtir._fstOutputs);
+                Fst = new FST<long?>(clone, outerInstance._fstOutputs);
                 clone.Dispose();
 
                 /*
@@ -206,19 +205,19 @@ namespace Lucene.Net.Codecs.BlockTerms
                 w.close();
                 */
 
-                if (_vgtir._indexDivisor > 1)
+                if (outerInstance._indexDivisor > 1)
                 {
                     // subsample
                     var scratchIntsRef = new IntsRef();
                     var outputs = PositiveIntOutputs.Singleton;
                     var builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, outputs);
                     var fstEnum = new BytesRefFSTEnum<long?>(Fst);
-                    var count = _vgtir._indexDivisor;
+                    var count = outerInstance._indexDivisor;
 
                     BytesRefFSTEnum.InputOutput<long?> result;
                     while ((result = fstEnum.Next()) != null)
                     {
-                        if (count == _vgtir._indexDivisor)
+                        if (count == outerInstance._indexDivisor)
                         {
                             builder.Add(Util.ToIntsRef(result.Input, scratchIntsRef), result.Output);
                             count = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
index c172433..2426546 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
@@ -201,7 +201,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         public override FieldWriter AddField(FieldInfo field, long termsFilePointer)
         {
             _policy.NewField(field);
-            var writer = new FstFieldWriter(field, termsFilePointer, this);
+            var writer = new FstFieldWriter(this, field, termsFilePointer);
             _fields.Add(writer);
             return writer;
         }
@@ -232,8 +232,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class FstFieldWriter : FieldWriter
         {
-            // Outer instance
-            private readonly VariableGapTermsIndexWriter _vgtiw;
+            private readonly VariableGapTermsIndexWriter outerInstance;
 
             private readonly Builder<long?> _fstBuilder;
             private readonly PositiveIntOutputs fstOutputs;
@@ -246,13 +245,13 @@ namespace Lucene.Net.Codecs.BlockTerms
             private readonly BytesRef _lastTerm = new BytesRef();
             private bool _first = true;
 
-            public FstFieldWriter(FieldInfo fieldInfo, long termsFilePointer, VariableGapTermsIndexWriter
vgtiw)
+            public FstFieldWriter(VariableGapTermsIndexWriter outerInstance, FieldInfo fieldInfo,
long termsFilePointer)
             {
-                _vgtiw = vgtiw;
+                this.outerInstance = outerInstance;
                 FieldInfo = fieldInfo;
                 PositiveIntOutputs fstOutputs = PositiveIntOutputs.Singleton;
                 _fstBuilder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, fstOutputs);
-                IndexStart = _vgtiw.Output.FilePointer;
+                IndexStart = this.outerInstance.Output.FilePointer;
 
                 // Always put empty string in
                 _fstBuilder.Add(new IntsRef(), termsFilePointer);
@@ -263,7 +262,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 // NOTE: we must force the first term per field to be
                 // indexed, in case policy doesn't:
-                if (_vgtiw._policy.IsIndexTerm(text, stats) || _first)
+                if (outerInstance._policy.IsIndexTerm(text, stats) || _first)
                 {
                     _first = false;
                     return true;
@@ -284,7 +283,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     return;
                 }
                 int lengthSave = text.Length;
-                text.Length = _vgtiw.IndexedTermPrefixLength(_lastTerm, text);
+                text.Length = outerInstance.IndexedTermPrefixLength(_lastTerm, text);
                 try
                 {
                     _fstBuilder.Add(Util.ToIntsRef(text, _scratchIntsRef), termsFilePointer);
@@ -300,7 +299,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 Fst = _fstBuilder.Finish();
                 if (Fst != null)
-                    Fst.Save(_vgtiw.Output);
+                    Fst.Save(outerInstance.Output);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/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 1133abe..4be901a 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -408,24 +408,23 @@ namespace Lucene.Net.Codecs.Bloom
 
         internal class BloomFilteredFieldsConsumer : FieldsConsumer
         {
-            // Outer instance
-            private readonly BloomFilteringPostingsFormat _bfpf;
+            private readonly BloomFilteringPostingsFormat outerInstance;
 
             private readonly FieldsConsumer _delegateFieldsConsumer;
             private readonly Dictionary<FieldInfo, FuzzySet> _bloomFilters = new Dictionary<FieldInfo,
FuzzySet>();
             private readonly SegmentWriteState _state;
             
-            public BloomFilteredFieldsConsumer(FieldsConsumer fieldsConsumer,
-                SegmentWriteState state, BloomFilteringPostingsFormat bfpf)
+            public BloomFilteredFieldsConsumer(BloomFilteringPostingsFormat outerInstance,
FieldsConsumer fieldsConsumer,
+                SegmentWriteState state)
             {
+                this.outerInstance = outerInstance;
                 _delegateFieldsConsumer = fieldsConsumer;
                 _state = state;
-                _bfpf = bfpf;
             }
 
             public override TermsConsumer AddField(FieldInfo field)
             {
-                var bloomFilter = _bfpf._bloomFilterFactory.GetSetForField(_state, field);
+                var bloomFilter = outerInstance._bloomFilterFactory.GetSetForField(_state,
field);
                 if (bloomFilter != null)
                 {
                     Debug.Assert((_bloomFilters.ContainsKey(field) == false));
@@ -443,7 +442,7 @@ namespace Lucene.Net.Codecs.Bloom
             {
                 _delegateFieldsConsumer.Dispose();
                 // Now we are done accumulating values for these fields
-                var nonSaturatedBlooms = (from entry in _bloomFilters.EntrySet() let bloomFilter
= entry.Value where !_bfpf._bloomFilterFactory.IsSaturated(bloomFilter, entry.Key) select
entry).ToList();
+                var nonSaturatedBlooms = (from entry in _bloomFilters.EntrySet() let bloomFilter
= entry.Value where !outerInstance._bloomFilterFactory.IsSaturated(bloomFilter, entry.Key)
select entry).ToList();
 
                 var bloomFileName = IndexFileNames.SegmentFileName(
                     _state.SegmentInfo.Name, _state.SegmentSuffix, BLOOM_EXTENSION);
@@ -454,7 +453,7 @@ namespace Lucene.Net.Codecs.Bloom
                     bloomOutput = _state.Directory.CreateOutput(bloomFileName, _state.Context);
                     CodecUtil.WriteHeader(bloomOutput, BLOOM_CODEC_NAME, VERSION_CURRENT);
                     // remember the name of the postings format we will delegate to
-                    bloomOutput.WriteString(_bfpf._delegatePostingsFormat.Name);
+                    bloomOutput.WriteString(outerInstance._delegatePostingsFormat.Name);
 
                     // First field in the output file is the number of fields+blooms saved
                     bloomOutput.WriteInt(nonSaturatedBlooms.Count);
@@ -479,7 +478,7 @@ namespace Lucene.Net.Codecs.Bloom
             private void SaveAppropriatelySizedBloomFilter(DataOutput bloomOutput,
                 FuzzySet bloomFilter, FieldInfo fieldInfo)
             {
-                var rightSizedSet = _bfpf._bloomFilterFactory.Downsize(fieldInfo,
+                var rightSizedSet = outerInstance._bloomFilterFactory.Downsize(fieldInfo,
                     bloomFilter) ?? bloomFilter;
 
                 rightSizedSet.Serialize(bloomOutput);


Mime
View raw message