lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [18/50] [abbrv] lucenenet git commit: Lucene.Net.Core.Index.AbstractDocValuesFieldUpdates: Renamed back to the original name DocValuesFieldUpdates
Date Sun, 05 Mar 2017 11:48:57 GMT
Lucene.Net.Core.Index.AbstractDocValuesFieldUpdates: Renamed back to the original name DocValuesFieldUpdates


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

Branch: refs/heads/api-work
Commit: f0a075488e039c943f9536ed31fba5850e69cd38
Parents: 5fb89cf
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Mar 3 13:16:11 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Mar 5 17:08:36 2017 +0700

----------------------------------------------------------------------
 .../Index/BinaryDocValuesFieldUpdates.cs        | 10 ++++----
 .../Index/BufferedUpdatesStream.cs              |  8 +++---
 .../Index/DocValuesFieldUpdates.cs              | 14 +++++------
 src/Lucene.Net.Core/Index/IndexWriter.cs        | 26 ++++++++++----------
 .../Index/NumericDocValuesFieldUpdates.cs       | 10 ++++----
 src/Lucene.Net.Core/Index/ReadersAndUpdates.cs  | 10 ++++----
 6 files changed, 39 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f0a07548/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs b/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
index 3d56a7c..af861da 100644
--- a/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
@@ -31,14 +31,14 @@ namespace Lucene.Net.Index
     using PagedMutable = Lucene.Net.Util.Packed.PagedMutable;
 
     /// <summary>
-    /// A <seealso cref="AbstractDocValuesFieldUpdates"/> which holds updates of documents,
of a single
+    /// A <seealso cref="DocValuesFieldUpdates"/> which holds updates of documents,
of a single
     /// <seealso cref="BinaryDocValuesField"/>.
     ///
     /// @lucene.experimental
     /// </summary>
-    internal class BinaryDocValuesFieldUpdates : AbstractDocValuesFieldUpdates
+    internal class BinaryDocValuesFieldUpdates : DocValuesFieldUpdates
     {
-        new internal sealed class Iterator : AbstractDocValuesFieldUpdates.Iterator
+        new internal sealed class Iterator : DocValuesFieldUpdates.Iterator
         {
             private readonly PagedGrowableWriter offsets;
             private readonly int size;
@@ -173,7 +173,7 @@ namespace Lucene.Net.Index
             ++size;
         }
 
-        public override AbstractDocValuesFieldUpdates.Iterator GetIterator()
+        public override DocValuesFieldUpdates.Iterator GetIterator()
         {
             PagedMutable docs = this.docs;
             PagedGrowableWriter offsets = this.offsets;
@@ -244,7 +244,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        public override void Merge(AbstractDocValuesFieldUpdates other)
+        public override void Merge(DocValuesFieldUpdates other)
         {
             BinaryDocValuesFieldUpdates otherUpdates = (BinaryDocValuesFieldUpdates)other;
             int newSize = size + otherUpdates.size;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f0a07548/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs b/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
index 9ae9d7f..c86451e 100644
--- a/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
+++ b/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
@@ -257,7 +257,7 @@ namespace Lucene.Net.Index
                         bool segAllDeletes;
                         try
                         {
-                            AbstractDocValuesFieldUpdates.Container dvUpdates = new AbstractDocValuesFieldUpdates.Container();
+                            DocValuesFieldUpdates.Container dvUpdates = new DocValuesFieldUpdates.Container();
                             if (coalescedUpdates != null)
                             {
                                 //System.out.println("    del coalesced");
@@ -331,7 +331,7 @@ namespace Lucene.Net.Index
                             {
                                 delCount += (int)ApplyTermDeletes(coalescedUpdates.TermsIterable(),
rld, reader);
                                 delCount += (int)ApplyQueryDeletes(coalescedUpdates.QueriesIterable(),
rld, reader);
-                                AbstractDocValuesFieldUpdates.Container dvUpdates = new AbstractDocValuesFieldUpdates.Container();
+                                DocValuesFieldUpdates.Container dvUpdates = new DocValuesFieldUpdates.Container();
                                 ApplyDocValuesUpdates(coalescedUpdates.numericDVUpdates,
rld, reader, dvUpdates);
                                 ApplyDocValuesUpdates(coalescedUpdates.binaryDVUpdates, rld,
reader, dvUpdates);
                                 if (dvUpdates.Any())
@@ -540,7 +540,7 @@ namespace Lucene.Net.Index
         }
 
         // DocValues updates
-        private void ApplyDocValuesUpdates<T1>(IEnumerable<T1> updates, ReadersAndUpdates
rld, SegmentReader reader, AbstractDocValuesFieldUpdates.Container dvUpdatesContainer) where
T1 : DocValuesUpdate
+        private void ApplyDocValuesUpdates<T1>(IEnumerable<T1> updates, ReadersAndUpdates
rld, SegmentReader reader, DocValuesFieldUpdates.Container dvUpdatesContainer) where T1 :
DocValuesUpdate
         {
             lock (this)
             {
@@ -611,7 +611,7 @@ namespace Lucene.Net.Index
 
                         //System.out.println("BDS: got docsEnum=" + docsEnum);
 
-                        AbstractDocValuesFieldUpdates dvUpdates = dvUpdatesContainer.GetUpdates(update.field,
update.type);
+                        DocValuesFieldUpdates dvUpdates = dvUpdatesContainer.GetUpdates(update.field,
update.type);
                         if (dvUpdates == null)
                         {
                             dvUpdates = dvUpdatesContainer.NewUpdates(update.field, update.type,
reader.MaxDoc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f0a07548/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs b/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
index d832236..c306d68 100644
--- a/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
@@ -25,9 +25,9 @@ namespace Lucene.Net.Index
     ///
     /// @lucene.experimental
     /// </summary>
-    internal abstract class AbstractDocValuesFieldUpdates // LUCENENET specific - Added Abstract
prefix for the internal type
+    internal abstract class DocValuesFieldUpdates
     {
-        // LUCENENET specific: moved Type enum to new class named DocValuesFieldUpdates (the
original name of this class)
+        // LUCENENET specific: de-nested Type enum and renamed DocValuesFieldUpdatesType
 
         /// <summary>
         /// An iterator over documents and their updated values. Only documents with
@@ -89,7 +89,7 @@ namespace Lucene.Net.Index
                 get { return numericDVUpdates.Count + binaryDVUpdates.Count; }
             }
 
-            internal virtual AbstractDocValuesFieldUpdates GetUpdates(string field, DocValuesFieldUpdatesType
type)
+            internal virtual DocValuesFieldUpdates GetUpdates(string field, DocValuesFieldUpdatesType
type)
             {
                 switch (type)
                 {
@@ -108,7 +108,7 @@ namespace Lucene.Net.Index
                 }
             }
 
-            internal virtual AbstractDocValuesFieldUpdates NewUpdates(string field, DocValuesFieldUpdatesType
type, int maxDoc)
+            internal virtual DocValuesFieldUpdates NewUpdates(string field, DocValuesFieldUpdatesType
type, int maxDoc)
             {
                 switch (type)
                 {
@@ -140,7 +140,7 @@ namespace Lucene.Net.Index
         internal readonly string field;
         internal readonly DocValuesFieldUpdatesType type;
 
-        protected internal AbstractDocValuesFieldUpdates(string field, DocValuesFieldUpdatesType
type)
+        protected internal DocValuesFieldUpdates(string field, DocValuesFieldUpdatesType
type)
         {
             this.field = field;
             this.type = type;
@@ -159,11 +159,11 @@ namespace Lucene.Net.Index
         public abstract Iterator GetIterator();
 
         /// <summary>
-        /// Merge with another <seealso cref="AbstractDocValuesFieldUpdates"/>. this
is called for a
+        /// Merge with another <seealso cref="DocValuesFieldUpdates"/>. this is called
for a
         /// segment which received updates while it was being merged. The given updates
         /// should override whatever updates are in that instance.
         /// </summary>
-        public abstract void Merge(AbstractDocValuesFieldUpdates other);
+        public abstract void Merge(DocValuesFieldUpdates other);
 
         /// <summary>
         /// Returns true if this instance contains any updates. </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f0a07548/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs b/src/Lucene.Net.Core/Index/IndexWriter.cs
index 85bcfa8..f198c98 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -4017,9 +4017,9 @@ namespace Lucene.Net.Index
             }
         }
 
-        private void SkipDeletedDoc(AbstractDocValuesFieldUpdates.Iterator[] updatesIters,
int deletedDoc)
+        private void SkipDeletedDoc(DocValuesFieldUpdates.Iterator[] updatesIters, int deletedDoc)
         {
-            foreach (AbstractDocValuesFieldUpdates.Iterator iter in updatesIters)
+            foreach (DocValuesFieldUpdates.Iterator iter in updatesIters)
             {
                 if (iter.Doc == deletedDoc)
                 {
@@ -4058,12 +4058,12 @@ namespace Lucene.Net.Index
             }
         }
 
-        private void MaybeApplyMergedDVUpdates(MergePolicy.OneMerge merge, MergeState mergeState,
int docUpto, MergedDeletesAndUpdates holder, string[] mergingFields, AbstractDocValuesFieldUpdates[]
dvFieldUpdates, AbstractDocValuesFieldUpdates.Iterator[] updatesIters, int curDoc)
+        private void MaybeApplyMergedDVUpdates(MergePolicy.OneMerge merge, MergeState mergeState,
int docUpto, MergedDeletesAndUpdates holder, string[] mergingFields, DocValuesFieldUpdates[]
dvFieldUpdates, DocValuesFieldUpdates.Iterator[] updatesIters, int curDoc)
         {
             int newDoc = -1;
             for (int idx = 0; idx < mergingFields.Length; idx++)
             {
-                AbstractDocValuesFieldUpdates.Iterator updatesIter = updatesIters[idx];
+                DocValuesFieldUpdates.Iterator updatesIter = updatesIters[idx];
                 if (updatesIter.Doc == curDoc) // document has an update
                 {
                     if (holder.mergedDeletesAndUpdates == null)
@@ -4074,7 +4074,7 @@ namespace Lucene.Net.Index
                     {
                         newDoc = holder.docMap.Map(docUpto);
                     }
-                    AbstractDocValuesFieldUpdates dvUpdates = dvFieldUpdates[idx];
+                    DocValuesFieldUpdates dvUpdates = dvFieldUpdates[idx];
                     dvUpdates.Add(newDoc, updatesIter.Value);
                     updatesIter.NextDoc(); // advance to next document
                 }
@@ -4116,7 +4116,7 @@ namespace Lucene.Net.Index
 
                 // Lazy init (only when we find a delete to carry over):
                 MergedDeletesAndUpdates holder = new MergedDeletesAndUpdates();
-                AbstractDocValuesFieldUpdates.Container mergedDVUpdates = new AbstractDocValuesFieldUpdates.Container();
+                DocValuesFieldUpdates.Container mergedDVUpdates = new DocValuesFieldUpdates.Container();
 
                 for (int i = 0; i < sourceSegments.Count; i++)
                 {
@@ -4128,10 +4128,10 @@ namespace Lucene.Net.Index
                     // We hold a ref so it should still be in the pool:
                     Debug.Assert(rld != null, "seg=" + info.Info.Name);
                     IBits currentLiveDocs = rld.LiveDocs;
-                    IDictionary<string, AbstractDocValuesFieldUpdates> mergingFieldUpdates
= rld.MergingFieldUpdates;
+                    IDictionary<string, DocValuesFieldUpdates> mergingFieldUpdates
= rld.MergingFieldUpdates;
                     string[] mergingFields;
-                    AbstractDocValuesFieldUpdates[] dvFieldUpdates;
-                    AbstractDocValuesFieldUpdates.Iterator[] updatesIters;
+                    DocValuesFieldUpdates[] dvFieldUpdates;
+                    DocValuesFieldUpdates.Iterator[] updatesIters;
                     if (mergingFieldUpdates.Count == 0)
                     {
                         mergingFields = null;
@@ -4141,13 +4141,13 @@ namespace Lucene.Net.Index
                     else
                     {
                         mergingFields = new string[mergingFieldUpdates.Count];
-                        dvFieldUpdates = new AbstractDocValuesFieldUpdates[mergingFieldUpdates.Count];
-                        updatesIters = new AbstractDocValuesFieldUpdates.Iterator[mergingFieldUpdates.Count];
+                        dvFieldUpdates = new DocValuesFieldUpdates[mergingFieldUpdates.Count];
+                        updatesIters = new DocValuesFieldUpdates.Iterator[mergingFieldUpdates.Count];
                         int idx = 0;
-                        foreach (KeyValuePair<string, AbstractDocValuesFieldUpdates>
e in mergingFieldUpdates)
+                        foreach (KeyValuePair<string, DocValuesFieldUpdates> e in mergingFieldUpdates)
                         {
                             string field = e.Key;
-                            AbstractDocValuesFieldUpdates updates = e.Value;
+                            DocValuesFieldUpdates updates = e.Value;
                             mergingFields[idx] = field;
                             dvFieldUpdates[idx] = mergedDVUpdates.GetUpdates(field, updates.type);
                             if (dvFieldUpdates[idx] == null)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f0a07548/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs b/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
index a524b09..26aed5d 100644
--- a/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
@@ -30,14 +30,14 @@ namespace Lucene.Net.Index
     using PagedMutable = Lucene.Net.Util.Packed.PagedMutable;
 
     /// <summary>
-    /// A <seealso cref="AbstractDocValuesFieldUpdates"/> which holds updates of documents,
of a single
+    /// A <seealso cref="DocValuesFieldUpdates"/> which holds updates of documents,
of a single
     /// <seealso cref="NumericDocValuesField"/>.
     ///
     /// @lucene.experimental
     /// </summary>
-    internal class NumericDocValuesFieldUpdates : AbstractDocValuesFieldUpdates
+    internal class NumericDocValuesFieldUpdates : DocValuesFieldUpdates
     {
-        new internal sealed class Iterator : AbstractDocValuesFieldUpdates.Iterator
+        new internal sealed class Iterator : DocValuesFieldUpdates.Iterator
         {
             private readonly int size;
             private readonly PagedGrowableWriter values;
@@ -145,7 +145,7 @@ namespace Lucene.Net.Index
             ++size;
         }
 
-        public override AbstractDocValuesFieldUpdates.Iterator GetIterator()
+        public override DocValuesFieldUpdates.Iterator GetIterator()
         {
             PagedMutable docs = this.docs;
             PagedGrowableWriter values = this.values;
@@ -208,7 +208,7 @@ namespace Lucene.Net.Index
             }
         }
 
-        public override void Merge(AbstractDocValuesFieldUpdates other)
+        public override void Merge(DocValuesFieldUpdates other)
         {
             Debug.Assert(other is NumericDocValuesFieldUpdates);
             NumericDocValuesFieldUpdates otherUpdates = (NumericDocValuesFieldUpdates)other;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f0a07548/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs b/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
index de07b6f..2d669bd 100644
--- a/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
+++ b/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
@@ -89,7 +89,7 @@ namespace Lucene.Net.Index
         // updates on the merged segment too.
         private bool isMerging = false;
 
-        private readonly IDictionary<string, AbstractDocValuesFieldUpdates> mergingDVUpdates
= new Dictionary<string, AbstractDocValuesFieldUpdates>();
+        private readonly IDictionary<string, DocValuesFieldUpdates> mergingDVUpdates
= new Dictionary<string, DocValuesFieldUpdates>();
 
         public ReadersAndUpdates(IndexWriter writer, SegmentCommitInfo info)
         {
@@ -448,7 +448,7 @@ namespace Lucene.Net.Index
         }
 
         // Writes field updates (new _X_N updates files) to the directory
-        public virtual void WriteFieldUpdates(Directory dir, AbstractDocValuesFieldUpdates.Container
dvUpdates)
+        public virtual void WriteFieldUpdates(Directory dir, DocValuesFieldUpdates.Container
dvUpdates)
         {
             lock (this)
             {
@@ -594,7 +594,7 @@ namespace Lucene.Net.Index
                 {
                     foreach (KeyValuePair<string, NumericDocValuesFieldUpdates> e in
dvUpdates.numericDVUpdates)
                     {
-                        AbstractDocValuesFieldUpdates updates;
+                        DocValuesFieldUpdates updates;
                         if (!mergingDVUpdates.TryGetValue(e.Key, out updates))
                         {
                             mergingDVUpdates[e.Key] = e.Value;
@@ -606,7 +606,7 @@ namespace Lucene.Net.Index
                     }
                     foreach (KeyValuePair<string, BinaryDocValuesFieldUpdates> e in
dvUpdates.binaryDVUpdates)
                     {
-                        AbstractDocValuesFieldUpdates updates;
+                        DocValuesFieldUpdates updates;
                         if (!mergingDVUpdates.TryGetValue(e.Key, out updates))
                         {
                             mergingDVUpdates[e.Key] = e.Value;
@@ -938,7 +938,7 @@ namespace Lucene.Net.Index
 
         /// <summary>
         /// Returns updates that came in while this segment was merging. </summary>
-        public virtual IDictionary<string, AbstractDocValuesFieldUpdates> MergingFieldUpdates
+        public virtual IDictionary<string, DocValuesFieldUpdates> MergingFieldUpdates
         {
             get
             {


Mime
View raw message