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/02/08 14:32:07 UTC
[28/53] [abbrv] lucenenet git commit: Lucene.Net.Core: Renamed all
type-derived classes and interfaces from Short, Int, Long,
and Float to match CLR types Int16, Int32, Int64, and Single, respectively.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Document/FloatField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/FloatField.cs b/src/Lucene.Net.Core/Document/FloatField.cs
index 8d584bc..57aa6da 100644
--- a/src/Lucene.Net.Core/Document/FloatField.cs
+++ b/src/Lucene.Net.Core/Document/FloatField.cs
@@ -45,7 +45,7 @@ namespace Lucene.Net.Documents
/// }
/// </pre>
///
- /// See also <seealso cref="IntField"/>, <seealso cref="LongField"/>, {@link
+ /// See also <seealso cref="Int32Field"/>, <seealso cref="Int64Field"/>, {@link
/// DoubleField}.</p>
///
/// <p>To perform range querying or filtering against a
@@ -104,10 +104,12 @@ namespace Lucene.Net.Documents
/// NumericTokenStream} directly, when indexing numbers. this
/// class is a wrapper around this token stream type for
/// easier, more intuitive usage.</p>
- ///
+ /// <para>
+ /// NOTE: This was FloatField in Lucene
+ /// </para>
/// @since 2.9
/// </summary>
- public sealed class FloatField : Field
+ public sealed class SingleField : Field
{
/// <summary>
/// Type for a FloatField that is not stored:
@@ -115,7 +117,7 @@ namespace Lucene.Net.Documents
/// </summary>
public static readonly FieldType TYPE_NOT_STORED = new FieldType();
- static FloatField()
+ static SingleField()
{
TYPE_NOT_STORED.IsIndexed = true;
TYPE_NOT_STORED.IsTokenized = true;
@@ -147,7 +149,7 @@ namespace Lucene.Net.Documents
/// <param name="value"> 32-bit double value </param>
/// <param name="stored"> Store.YES if the content should also be stored </param>
/// <exception cref="IllegalArgumentException"> if the field name is null. </exception>
- public FloatField(string name, float value, Store stored)
+ public SingleField(string name, float value, Store stored)
: base(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED)
{
m_fieldsData = Convert.ToSingle(value);
@@ -162,7 +164,7 @@ namespace Lucene.Net.Documents
/// of <seealso cref="NumericType#FLOAT"/>. </param>
/// <exception cref="IllegalArgumentException"> if the field name or type is null, or
/// if the field type does not have a FLOAT numericType() </exception>
- public FloatField(string name, float value, FieldType type)
+ public SingleField(string name, float value, FieldType type)
: base(name, type)
{
if (type.NumericType != NumericType.FLOAT)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Document/IntDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/IntDocValuesField.cs b/src/Lucene.Net.Core/Document/IntDocValuesField.cs
index afa39d1..9b1c57e 100644
--- a/src/Lucene.Net.Core/Document/IntDocValuesField.cs
+++ b/src/Lucene.Net.Core/Document/IntDocValuesField.cs
@@ -28,17 +28,20 @@ namespace Lucene.Net.Documents
/// </pre>
///
/// If you also need to store the value, you should add a
- /// separate <seealso cref="StoredField"/> instance. </summary>
+ /// separate <seealso cref="StoredField"/> instance.
+ /// <para/>
+ /// NOTE: This was IntDocValuesField in Lucene
+ /// </summary>
/// <seealso cref="NumericDocValuesField"/>
[Obsolete("Deprecated, use NumericDocValuesField instead")]
- public class IntDocValuesField : NumericDocValuesField
+ public class Int32DocValuesField : NumericDocValuesField
{
/// <summary>
- /// Creates a new DocValues field with the specified 32-bit integer value </summary>
+ /// Creates a new DocValues field with the specified 32-bit <see cref="int"/> value </summary>
/// <param name="name"> field name </param>
- /// <param name="value"> 32-bit integer value </param>
+ /// <param name="value"> 32-bit <see cref="int"/> value </param>
/// <exception cref="ArgumentException"> if the field name is null </exception>
- public IntDocValuesField(string name, int value)
+ public Int32DocValuesField(string name, int value)
: base(name, value)
{
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Document/IntField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/IntField.cs b/src/Lucene.Net.Core/Document/IntField.cs
index 46ed541..b5f2f54 100644
--- a/src/Lucene.Net.Core/Document/IntField.cs
+++ b/src/Lucene.Net.Core/Document/IntField.cs
@@ -45,7 +45,7 @@ namespace Lucene.Net.Documents
/// }
/// </pre>
///
- /// See also <seealso cref="LongField"/>, <seealso cref="FloatField"/>, {@link
+ /// See also <seealso cref="Int64Field"/>, <seealso cref="SingleField"/>, {@link
/// DoubleField}.</p>
///
/// <p>To perform range querying or filtering against a
@@ -104,10 +104,12 @@ namespace Lucene.Net.Documents
/// NumericTokenStream} directly, when indexing numbers. this
/// class is a wrapper around this token stream type for
/// easier, more intuitive usage.</p>
- ///
+ /// <para>
+ /// NOTE: This was IntField in Lucene
+ /// </para>
/// @since 2.9
/// </summary>
- public sealed class IntField : Field
+ public sealed class Int32Field : Field
{
/// <summary>
/// Type for an IntField that is not stored:
@@ -115,7 +117,7 @@ namespace Lucene.Net.Documents
/// </summary>
public static readonly FieldType TYPE_NOT_STORED = new FieldType();
- static IntField()
+ static Int32Field()
{
TYPE_NOT_STORED.IsIndexed = true;
TYPE_NOT_STORED.IsTokenized = true;
@@ -147,7 +149,7 @@ namespace Lucene.Net.Documents
/// <param name="value"> 32-bit integer value </param>
/// <param name="stored"> Store.YES if the content should also be stored </param>
/// <exception cref="IllegalArgumentException"> if the field name is null. </exception>
- public IntField(string name, int value, Store stored)
+ public Int32Field(string name, int value, Store stored)
: base(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED)
{
m_fieldsData = Convert.ToInt32(value);
@@ -162,7 +164,7 @@ namespace Lucene.Net.Documents
/// of <seealso cref="NumericType#INT"/>. </param>
/// <exception cref="IllegalArgumentException"> if the field name or type is null, or
/// if the field type does not have a INT numericType() </exception>
- public IntField(string name, int value, FieldType type)
+ public Int32Field(string name, int value, FieldType type)
: base(name, type)
{
if (type.NumericType != NumericType.INT)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Document/LongDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/LongDocValuesField.cs b/src/Lucene.Net.Core/Document/LongDocValuesField.cs
index fac0278..556d0af 100644
--- a/src/Lucene.Net.Core/Document/LongDocValuesField.cs
+++ b/src/Lucene.Net.Core/Document/LongDocValuesField.cs
@@ -31,17 +31,20 @@ namespace Lucene.Net.Documents
/// <p>
/// If you also need to store the value, you should add a
/// separate <seealso cref="StoredField"/> instance.</p>
+ /// <para>
+ /// NOTE: This was LongDocValuesField in Lucene
+ /// </para>
/// </summary>
/// <seealso cref="NumericDocValues"/>
[Obsolete("Use NumericDocValuesField instead")]
- public class LongDocValuesField : NumericDocValuesField
+ public class Int64DocValuesField : NumericDocValuesField
{
/// <summary>
/// Creates a new DocValues field with the specified 64-bit long value </summary>
/// <param name="name"> field name </param>
/// <param name="value"> 64-bit long value </param>
/// <exception cref="ArgumentException"> if the field name is null </exception>
- public LongDocValuesField(string name, long value)
+ public Int64DocValuesField(string name, long value)
: base(name, value)
{
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Document/LongField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/LongField.cs b/src/Lucene.Net.Core/Document/LongField.cs
index 9289e89..8296269 100644
--- a/src/Lucene.Net.Core/Document/LongField.cs
+++ b/src/Lucene.Net.Core/Document/LongField.cs
@@ -45,7 +45,7 @@ namespace Lucene.Net.Documents
/// }
/// </pre>
///
- /// See also <seealso cref="IntField"/>, <seealso cref="FloatField"/>, {@link
+ /// See also <seealso cref="Int32Field"/>, <seealso cref="SingleField"/>, {@link
/// DoubleField}.
///
/// Any type that can be converted to long can also be
@@ -114,10 +114,12 @@ namespace Lucene.Net.Documents
/// NumericTokenStream} directly, when indexing numbers. this
/// class is a wrapper around this token stream type for
/// easier, more intuitive usage.</p>
- ///
+ /// <para>
+ /// NOTE: This was LongField in Lucene
+ /// </para>
/// @since 2.9
/// </summary>
- public sealed class LongField : Field
+ public sealed class Int64Field : Field
{
/// <summary>
/// Type for a LongField that is not stored:
@@ -125,7 +127,7 @@ namespace Lucene.Net.Documents
/// </summary>
public static readonly FieldType TYPE_NOT_STORED = new FieldType();
- static LongField()
+ static Int64Field()
{
TYPE_NOT_STORED.IsIndexed = true;
TYPE_NOT_STORED.IsTokenized = true;
@@ -157,7 +159,7 @@ namespace Lucene.Net.Documents
/// <param name="value"> 64-bit long value </param>
/// <param name="stored"> Store.YES if the content should also be stored </param>
/// <exception cref="IllegalArgumentException"> if the field name is null. </exception>
- public LongField(string name, long value, Store stored)
+ public Int64Field(string name, long value, Store stored)
: base(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED)
{
m_fieldsData = Convert.ToInt64(value);
@@ -172,7 +174,7 @@ namespace Lucene.Net.Documents
/// of <seealso cref="NumericType#LONG"/>. </param>
/// <exception cref="IllegalArgumentException"> if the field name or type is null, or
/// if the field type does not have a LONG numericType() </exception>
- public LongField(string name, long value, FieldType type)
+ public Int64Field(string name, long value, FieldType type)
: base(name, type)
{
if (type.NumericType != NumericType.LONG)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Document/PackedLongDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/PackedLongDocValuesField.cs b/src/Lucene.Net.Core/Document/PackedLongDocValuesField.cs
index c1f8d63..5583920 100644
--- a/src/Lucene.Net.Core/Document/PackedLongDocValuesField.cs
+++ b/src/Lucene.Net.Core/Document/PackedLongDocValuesField.cs
@@ -31,18 +31,21 @@ namespace Lucene.Net.Documents
/// <p>
/// If you also need to store the value, you should add a
/// separate <seealso cref="StoredField"/> instance.
+ /// <para>
+ /// NOTE: This was PackedLongDocValuesField in Lucene
+ /// </para>
/// </summary>
/// <seealso cref= NumericDocValues </seealso>
/// @deprecated use <seealso cref="NumericDocValuesField"/> instead.
[Obsolete("Use NumericDocValuesField instead.")]
- public class PackedLongDocValuesField : NumericDocValuesField
+ public class PackedInt64DocValuesField : NumericDocValuesField
{
/// <summary>
- /// Creates a new DocValues field with the specified long value </summary>
+ /// Creates a new DocValues field with the specified <see cref="long"/> value </summary>
/// <param name="name"> field name </param>
- /// <param name="value"> 64-bit long value </param>
+ /// <param name="value"> 64-bit <see cref="long"/> value </param>
/// <exception cref="ArgumentException"> if the field name is null </exception>
- public PackedLongDocValuesField(string name, long value)
+ public PackedInt64DocValuesField(string name, long value)
: base(name, value)
{
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Document/ShortDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/ShortDocValuesField.cs b/src/Lucene.Net.Core/Document/ShortDocValuesField.cs
index 92bbf57..fbb1d94 100644
--- a/src/Lucene.Net.Core/Document/ShortDocValuesField.cs
+++ b/src/Lucene.Net.Core/Document/ShortDocValuesField.cs
@@ -31,18 +31,21 @@ namespace Lucene.Net.Documents
/// <p>
/// If you also need to store the value, you should add a
/// separate <seealso cref="StoredField"/> instance.
+ /// <para>
+ /// NOTE: This was ShortDocValuesField in Lucene
+ /// </para>
/// </summary>
/// <seealso cref= NumericDocValues </seealso>
/// @deprecated use <seealso cref="NumericDocValuesField"/> instead.
[Obsolete("Use NumericDocValuesField instead.")]
- public class ShortDocValuesField : NumericDocValuesField
+ public class Int16DocValuesField : NumericDocValuesField
{
/// <summary>
- /// Creates a new DocValues field with the specified 16-bit short value </summary>
+ /// Creates a new DocValues field with the specified 16-bit <see cref="short"/> value </summary>
/// <param name="name"> field name </param>
- /// <param name="value"> 16-bit short value </param>
+ /// <param name="value"> 16-bit <see cref="short"/> value </param>
/// <exception cref="ArgumentException"> if the field name is null </exception>
- public ShortDocValuesField(string name, short value)
+ public Int16DocValuesField(string name, short value)
: base(name, value)
{
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs b/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
index d4f43f2..b6ba1b4 100644
--- a/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
+++ b/src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Index
using ByteRunAutomaton = Lucene.Net.Util.Automaton.ByteRunAutomaton;
using BytesRef = Lucene.Net.Util.BytesRef;
using CompiledAutomaton = Lucene.Net.Util.Automaton.CompiledAutomaton;
- using IntsRef = Lucene.Net.Util.IntsRef;
+ using Int32sRef = Lucene.Net.Util.Int32sRef;
using StringHelper = Lucene.Net.Util.StringHelper;
using Transition = Lucene.Net.Util.Automaton.Transition;
@@ -192,7 +192,7 @@ namespace Lucene.Net.Index
linear = true;
}
- private readonly IntsRef savedStates = new IntsRef(10);
+ private readonly Int32sRef savedStates = new Int32sRef(10);
/// <summary>
/// Increments the byte buffer to the next String in binary order after s that will not put
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/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 0e20728..082b25a 100644
--- a/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
@@ -26,7 +26,7 @@ namespace Lucene.Net.Index
using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
using FixedBitSet = Lucene.Net.Util.FixedBitSet;
using InPlaceMergeSorter = Lucene.Net.Util.InPlaceMergeSorter;
- using PackedInts = Lucene.Net.Util.Packed.PackedInts;
+ using PackedInt32s = Lucene.Net.Util.Packed.PackedInt32s;
using PagedGrowableWriter = Lucene.Net.Util.Packed.PagedGrowableWriter;
using PagedMutable = Lucene.Net.Util.Packed.PagedMutable;
@@ -130,9 +130,9 @@ namespace Lucene.Net.Index
: base(field, DocValuesFieldUpdates.Type.BINARY)
{
docsWithField = new FixedBitSet(64);
- docs = new PagedMutable(1, 1024, PackedInts.BitsRequired(maxDoc - 1), PackedInts.COMPACT);
- offsets = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST);
- lengths = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST);
+ docs = new PagedMutable(1, 1024, PackedInt32s.BitsRequired(maxDoc - 1), PackedInt32s.COMPACT);
+ offsets = new PagedGrowableWriter(1, 1024, 1, PackedInt32s.FAST);
+ lengths = new PagedGrowableWriter(1, 1024, 1, PackedInt32s.FAST);
values = new BytesRef(16); // start small
size = 0;
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/BinaryDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/BinaryDocValuesWriter.cs b/src/Lucene.Net.Core/Index/BinaryDocValuesWriter.cs
index 3b1833d..908c2af 100644
--- a/src/Lucene.Net.Core/Index/BinaryDocValuesWriter.cs
+++ b/src/Lucene.Net.Core/Index/BinaryDocValuesWriter.cs
@@ -20,7 +20,7 @@ namespace Lucene.Net.Index
* limitations under the License.
*/
- using AppendingDeltaPackedLongBuffer = Lucene.Net.Util.Packed.AppendingDeltaPackedLongBuffer;
+ using AppendingDeltaPackedInt64Buffer = Lucene.Net.Util.Packed.AppendingDeltaPackedInt64Buffer;
using ArrayUtil = Lucene.Net.Util.ArrayUtil;
using BytesRef = Lucene.Net.Util.BytesRef;
using Counter = Lucene.Net.Util.Counter;
@@ -28,7 +28,7 @@ namespace Lucene.Net.Index
using DataOutput = Lucene.Net.Store.DataOutput;
using DocValuesConsumer = Lucene.Net.Codecs.DocValuesConsumer;
using FixedBitSet = Lucene.Net.Util.FixedBitSet;
- using PackedInts = Lucene.Net.Util.Packed.PackedInts;
+ using PackedInt32s = Lucene.Net.Util.Packed.PackedInt32s;
using PagedBytes = Lucene.Net.Util.PagedBytes;
using RamUsageEstimator = Lucene.Net.Util.RamUsageEstimator;
@@ -49,7 +49,7 @@ namespace Lucene.Net.Index
private readonly DataOutput bytesOut;
private readonly Counter iwBytesUsed;
- private readonly AppendingDeltaPackedLongBuffer lengths;
+ private readonly AppendingDeltaPackedInt64Buffer lengths;
private FixedBitSet docsWithField;
private readonly FieldInfo fieldInfo;
private int addedValues;
@@ -60,7 +60,7 @@ namespace Lucene.Net.Index
this.fieldInfo = fieldInfo;
this.bytes = new PagedBytes(BLOCK_BITS);
this.bytesOut = bytes.GetDataOutput();
- this.lengths = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
+ this.lengths = new AppendingDeltaPackedInt64Buffer(PackedInt32s.COMPACT);
this.iwBytesUsed = iwBytesUsed;
this.docsWithField = new FixedBitSet(64);
this.bytesUsed = DocsWithFieldBytesUsed();
@@ -136,7 +136,7 @@ namespace Lucene.Net.Index
{
// Use yield return instead of ucsom IEnumerable
- AppendingDeltaPackedLongBuffer.Iterator lengthsIterator = lengths.GetIterator();
+ AppendingDeltaPackedInt64Buffer.Iterator lengthsIterator = lengths.GetIterator();
int size = (int)lengths.Count;
DataInput bytesIterator = bytes.GetDataInput();
int maxDoc = maxDocParam;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/BufferedUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/BufferedUpdates.cs b/src/Lucene.Net.Core/Index/BufferedUpdates.cs
index d03d298..3f66ed5 100644
--- a/src/Lucene.Net.Core/Index/BufferedUpdates.cs
+++ b/src/Lucene.Net.Core/Index/BufferedUpdates.cs
@@ -117,9 +117,9 @@ namespace Lucene.Net.Index
*/
internal static readonly int BYTES_PER_BINARY_UPDATE_ENTRY = 7 * RamUsageEstimator.NUM_BYTES_OBJECT_REF + RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + RamUsageEstimator.NUM_BYTES_INT;
- internal readonly AtomicInteger numTermDeletes = new AtomicInteger();
- internal readonly AtomicInteger numNumericUpdates = new AtomicInteger();
- internal readonly AtomicInteger numBinaryUpdates = new AtomicInteger();
+ internal readonly AtomicInt32 numTermDeletes = new AtomicInt32();
+ internal readonly AtomicInt32 numNumericUpdates = new AtomicInt32();
+ internal readonly AtomicInt32 numBinaryUpdates = new AtomicInt32();
internal readonly IDictionary<Term, int?> terms = new Dictionary<Term, int?>();
internal readonly IDictionary<Query, int?> queries = new Dictionary<Query, int?>();
internal readonly IList<int?> docIDs = new List<int?>();
@@ -145,7 +145,7 @@ namespace Lucene.Net.Index
public static readonly int MAX_INT = Convert.ToInt32(int.MaxValue);
- internal readonly AtomicLong bytesUsed;
+ internal readonly AtomicInt64 bytesUsed;
private static bool VERBOSE_DELETES = false;
@@ -153,7 +153,7 @@ namespace Lucene.Net.Index
internal BufferedUpdates() // LUCENENET NOTE: Made internal rather than public, since this class is intended to be internal but couldn't be because it is exposed through a public API
{
- this.bytesUsed = new AtomicLong();
+ this.bytesUsed = new AtomicInt64();
}
public override string ToString()
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/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 5db21ca..4db8b0d 100644
--- a/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
+++ b/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
@@ -59,8 +59,8 @@ namespace Lucene.Net.Index
private Term lastDeleteTerm;
private readonly InfoStream infoStream;
- private readonly AtomicLong bytesUsed = new AtomicLong();
- private readonly AtomicInteger numTerms = new AtomicInteger();
+ private readonly AtomicInt64 bytesUsed = new AtomicInt64();
+ private readonly AtomicInt32 numTerms = new AtomicInt32();
public BufferedUpdatesStream(InfoStream infoStream)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/CheckIndex.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/CheckIndex.cs b/src/Lucene.Net.Core/Index/CheckIndex.cs
index b363b8d..a26eb30 100644
--- a/src/Lucene.Net.Core/Index/CheckIndex.cs
+++ b/src/Lucene.Net.Core/Index/CheckIndex.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Index
using FixedBitSet = Lucene.Net.Util.FixedBitSet;
using IndexInput = Lucene.Net.Store.IndexInput;
using IOContext = Lucene.Net.Store.IOContext;
- using LongBitSet = Lucene.Net.Util.LongBitSet;
+ using Int64BitSet = Lucene.Net.Util.Int64BitSet;
using Lucene3xSegmentInfoFormat = Lucene.Net.Codecs.Lucene3x.Lucene3xSegmentInfoFormat;
using PostingsFormat = Lucene.Net.Codecs.PostingsFormat;
using StringHelper = Lucene.Net.Util.StringHelper;
@@ -1874,7 +1874,7 @@ namespace Lucene.Net.Index
private static void CheckSortedSetDocValues(string fieldName, AtomicReader reader, SortedSetDocValues dv, IBits docsWithField)
{
long maxOrd = dv.ValueCount - 1;
- LongBitSet seenOrds = new LongBitSet(dv.ValueCount);
+ Int64BitSet seenOrds = new Int64BitSet(dv.ValueCount);
long maxOrd2 = -1;
for (int i = 0; i < reader.MaxDoc; i++)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/DocumentsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocumentsWriter.cs b/src/Lucene.Net.Core/Index/DocumentsWriter.cs
index 97c8aea..abbb2ad 100644
--- a/src/Lucene.Net.Core/Index/DocumentsWriter.cs
+++ b/src/Lucene.Net.Core/Index/DocumentsWriter.cs
@@ -110,7 +110,7 @@ namespace Lucene.Net.Index
private readonly LiveIndexWriterConfig config;
- private readonly AtomicInteger numDocsInRAM = new AtomicInteger(0);
+ private readonly AtomicInt32 numDocsInRAM = new AtomicInt32(0);
// TODO: cut over to BytesRefHash in BufferedDeletes
internal volatile DocumentsWriterDeleteQueue deleteQueue = new DocumentsWriterDeleteQueue();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/DocumentsWriterFlushQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocumentsWriterFlushQueue.cs b/src/Lucene.Net.Core/Index/DocumentsWriterFlushQueue.cs
index f488afb..d9cbe9d 100644
--- a/src/Lucene.Net.Core/Index/DocumentsWriterFlushQueue.cs
+++ b/src/Lucene.Net.Core/Index/DocumentsWriterFlushQueue.cs
@@ -32,7 +32,7 @@ namespace Lucene.Net.Index
// we track tickets separately since count must be present even before the ticket is
// constructed ie. queue.size would not reflect it.
- private readonly AtomicInteger ticketCount = new AtomicInteger();
+ private readonly AtomicInt32 ticketCount = new AtomicInt32();
private readonly ReentrantLock purgeLock = new ReentrantLock();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs b/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
index 470e590..56e01ec 100644
--- a/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
+++ b/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Index
using DirectTrackingAllocator = Lucene.Net.Util.ByteBlockPool.DirectTrackingAllocator;
using FlushInfo = Lucene.Net.Store.FlushInfo;
using InfoStream = Lucene.Net.Util.InfoStream;
- using IntBlockPool = Lucene.Net.Util.IntBlockPool;
+ using Int32BlockPool = Lucene.Net.Util.Int32BlockPool;
using IOContext = Lucene.Net.Store.IOContext;
using IMutableBits = Lucene.Net.Util.IMutableBits;
using RamUsageEstimator = Lucene.Net.Util.RamUsageEstimator;
@@ -218,7 +218,7 @@ namespace Lucene.Net.Index
private readonly DeleteSlice deleteSlice;
private readonly NumberFormatInfo nf = CultureInfo.InvariantCulture.NumberFormat;
internal readonly Allocator byteBlockAllocator;
- internal readonly IntBlockPool.Allocator intBlockAllocator;
+ internal readonly Int32BlockPool.Allocator intBlockAllocator;
private readonly LiveIndexWriterConfig indexWriterConfig;
public DocumentsWriterPerThread(string segmentName, Directory directory, LiveIndexWriterConfig indexWriterConfig, InfoStream infoStream, DocumentsWriterDeleteQueue deleteQueue, FieldInfos.Builder fieldInfos)
@@ -234,7 +234,7 @@ namespace Lucene.Net.Index
bytesUsed = Counter.NewCounter();
byteBlockAllocator = new DirectTrackingAllocator(bytesUsed);
pendingUpdates = new BufferedUpdates();
- intBlockAllocator = new IntBlockAllocator(bytesUsed);
+ intBlockAllocator = new Int32BlockAllocator(bytesUsed);
this.deleteQueue = deleteQueue;
Debug.Assert(numDocsInRAM == 0, "num docs " + numDocsInRAM);
pendingUpdates.Clear();
@@ -705,12 +705,15 @@ namespace Lucene.Net.Index
* getTerms/getTermsIndex requires <= 32768 */
internal static readonly int MAX_TERM_LENGTH_UTF8 = ByteBlockPool.BYTE_BLOCK_SIZE - 2;
- private class IntBlockAllocator : IntBlockPool.Allocator
+ /// <summary>
+ /// NOTE: This was IntBlockAllocator in Lucene
+ /// </summary>
+ private class Int32BlockAllocator : Int32BlockPool.Allocator
{
private readonly Counter bytesUsed;
- public IntBlockAllocator(Counter bytesUsed)
- : base(IntBlockPool.INT_BLOCK_SIZE)
+ public Int32BlockAllocator(Counter bytesUsed)
+ : base(Int32BlockPool.INT_BLOCK_SIZE)
{
this.bytesUsed = bytesUsed;
}
@@ -719,14 +722,14 @@ namespace Lucene.Net.Index
public override int[] GetInt32Block()
{
- int[] b = new int[IntBlockPool.INT_BLOCK_SIZE];
- bytesUsed.AddAndGet(IntBlockPool.INT_BLOCK_SIZE * RamUsageEstimator.NUM_BYTES_INT);
+ int[] b = new int[Int32BlockPool.INT_BLOCK_SIZE];
+ bytesUsed.AddAndGet(Int32BlockPool.INT_BLOCK_SIZE * RamUsageEstimator.NUM_BYTES_INT);
return b;
}
public override void RecycleInt32Blocks(int[][] blocks, int offset, int length)
{
- bytesUsed.AddAndGet(-(length * (IntBlockPool.INT_BLOCK_SIZE * RamUsageEstimator.NUM_BYTES_INT)));
+ bytesUsed.AddAndGet(-(length * (Int32BlockPool.INT_BLOCK_SIZE * RamUsageEstimator.NUM_BYTES_INT)));
}
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/IndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexReader.cs b/src/Lucene.Net.Core/Index/IndexReader.cs
index 46886d4..f445715 100644
--- a/src/Lucene.Net.Core/Index/IndexReader.cs
+++ b/src/Lucene.Net.Core/Index/IndexReader.cs
@@ -72,7 +72,7 @@ namespace Lucene.Net.Index
{
private bool closed = false;
private bool closedByChild = false;
- private readonly AtomicInteger refCount = new AtomicInteger(1);
+ private readonly AtomicInt32 refCount = new AtomicInt32(1);
internal IndexReader()
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/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 99a9381..2155239 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -256,8 +256,8 @@ namespace Lucene.Net.Index
private long mergeGen;
private bool stopMerges;
- internal readonly AtomicInteger flushCount = new AtomicInteger();
- internal readonly AtomicInteger flushDeletesCount = new AtomicInteger();
+ internal readonly AtomicInt32 flushCount = new AtomicInt32();
+ internal readonly AtomicInt32 flushDeletesCount = new AtomicInt32();
internal ReaderPool readerPool;
internal readonly BufferedUpdatesStream bufferedUpdatesStream;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/MergeState.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MergeState.cs b/src/Lucene.Net.Core/Index/MergeState.cs
index 971a771..5ffaee3 100644
--- a/src/Lucene.Net.Core/Index/MergeState.cs
+++ b/src/Lucene.Net.Core/Index/MergeState.cs
@@ -25,7 +25,7 @@ namespace Lucene.Net.Index
using IBits = Lucene.Net.Util.IBits;
using Directory = Lucene.Net.Store.Directory;
using InfoStream = Lucene.Net.Util.InfoStream;
- using MonotonicAppendingLongBuffer = Lucene.Net.Util.Packed.MonotonicAppendingLongBuffer;
+ using MonotonicAppendingInt64Buffer = Lucene.Net.Util.Packed.MonotonicAppendingInt64Buffer;
/// <summary>
/// Holds common state used during segment merging.
@@ -89,7 +89,7 @@ namespace Lucene.Net.Index
internal static DocMap Build(int maxDoc, IBits liveDocs)
{
Debug.Assert(liveDocs != null);
- MonotonicAppendingLongBuffer docMap = new MonotonicAppendingLongBuffer();
+ MonotonicAppendingInt64Buffer docMap = new MonotonicAppendingInt64Buffer();
int del = 0;
for (int i = 0; i < maxDoc; ++i)
{
@@ -109,10 +109,10 @@ namespace Lucene.Net.Index
{
private int maxDoc;
private IBits liveDocs;
- private MonotonicAppendingLongBuffer docMap;
+ private MonotonicAppendingInt64Buffer docMap;
private int numDeletedDocs;
- public DocMapAnonymousInnerClassHelper(int maxDoc, IBits liveDocs, MonotonicAppendingLongBuffer docMap, int numDeletedDocs)
+ public DocMapAnonymousInnerClassHelper(int maxDoc, IBits liveDocs, MonotonicAppendingInt64Buffer docMap, int numDeletedDocs)
{
this.maxDoc = maxDoc;
this.liveDocs = liveDocs;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/MultiDocValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MultiDocValues.cs b/src/Lucene.Net.Core/Index/MultiDocValues.cs
index bcd6fbc..ae9e91a 100644
--- a/src/Lucene.Net.Core/Index/MultiDocValues.cs
+++ b/src/Lucene.Net.Core/Index/MultiDocValues.cs
@@ -22,11 +22,11 @@ namespace Lucene.Net.Index
* limitations under the License.
*/
- using AppendingPackedLongBuffer = Lucene.Net.Util.Packed.AppendingPackedLongBuffer;
+ using AppendingPackedInt64Buffer = Lucene.Net.Util.Packed.AppendingPackedInt64Buffer;
using IBits = Lucene.Net.Util.IBits;
using BytesRef = Lucene.Net.Util.BytesRef;
- using MonotonicAppendingLongBuffer = Lucene.Net.Util.Packed.MonotonicAppendingLongBuffer;
- using PackedInts = Lucene.Net.Util.Packed.PackedInts;
+ using MonotonicAppendingInt64Buffer = Lucene.Net.Util.Packed.MonotonicAppendingInt64Buffer;
+ using PackedInt32s = Lucene.Net.Util.Packed.PackedInt32s;
using TermsEnumIndex = Lucene.Net.Index.MultiTermsEnum.TermsEnumIndex;
using TermsEnumWithSlice = Lucene.Net.Index.MultiTermsEnum.TermsEnumWithSlice;
@@ -443,13 +443,13 @@ namespace Lucene.Net.Index
internal readonly object owner;
// globalOrd -> (globalOrd - segmentOrd) where segmentOrd is the the ordinal in the first segment that contains this term
- internal readonly MonotonicAppendingLongBuffer globalOrdDeltas;
+ internal readonly MonotonicAppendingInt64Buffer globalOrdDeltas;
// globalOrd -> first segment container
- internal readonly AppendingPackedLongBuffer firstSegments;
+ internal readonly AppendingPackedInt64Buffer firstSegments;
// for every segment, segmentOrd -> (globalOrd - segmentOrd)
- internal readonly MonotonicAppendingLongBuffer[] ordDeltas;
+ internal readonly MonotonicAppendingInt64Buffer[] ordDeltas;
/// <summary>
/// Creates an ordinal map that allows mapping ords to/from a merged
@@ -463,12 +463,12 @@ namespace Lucene.Net.Index
// create the ordinal mappings by pulling a termsenum over each sub's
// unique terms, and walking a multitermsenum over those
this.owner = owner;
- globalOrdDeltas = new MonotonicAppendingLongBuffer(PackedInts.COMPACT);
- firstSegments = new AppendingPackedLongBuffer(PackedInts.COMPACT);
- ordDeltas = new MonotonicAppendingLongBuffer[subs.Length];
+ globalOrdDeltas = new MonotonicAppendingInt64Buffer(PackedInt32s.COMPACT);
+ firstSegments = new AppendingPackedInt64Buffer(PackedInt32s.COMPACT);
+ ordDeltas = new MonotonicAppendingInt64Buffer[subs.Length];
for (int i = 0; i < ordDeltas.Length; i++)
{
- ordDeltas[i] = new MonotonicAppendingLongBuffer();
+ ordDeltas[i] = new MonotonicAppendingInt64Buffer();
}
long[] segmentOrds = new long[subs.Length];
ReaderSlice[] slices = new ReaderSlice[subs.Length];
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/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 f9e041d..8d2dcc6 100644
--- a/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
@@ -25,7 +25,7 @@ namespace Lucene.Net.Index
using FixedBitSet = Lucene.Net.Util.FixedBitSet;
using InPlaceMergeSorter = Lucene.Net.Util.InPlaceMergeSorter;
using NumericDocValuesUpdate = Lucene.Net.Index.DocValuesUpdate.NumericDocValuesUpdate;
- using PackedInts = Lucene.Net.Util.Packed.PackedInts;
+ using PackedInt32s = Lucene.Net.Util.Packed.PackedInt32s;
using PagedGrowableWriter = Lucene.Net.Util.Packed.PagedGrowableWriter;
using PagedMutable = Lucene.Net.Util.Packed.PagedMutable;
@@ -107,8 +107,8 @@ namespace Lucene.Net.Index
: base(field, DocValuesFieldUpdates.Type.NUMERIC)
{
docsWithField = new FixedBitSet(64);
- docs = new PagedMutable(1, 1024, PackedInts.BitsRequired(maxDoc - 1), PackedInts.COMPACT);
- values = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST);
+ docs = new PagedMutable(1, 1024, PackedInt32s.BitsRequired(maxDoc - 1), PackedInt32s.COMPACT);
+ values = new PagedGrowableWriter(1, 1024, 1, PackedInt32s.FAST);
size = 0;
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/NumericDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/NumericDocValuesWriter.cs b/src/Lucene.Net.Core/Index/NumericDocValuesWriter.cs
index d1a988a..88eb450 100644
--- a/src/Lucene.Net.Core/Index/NumericDocValuesWriter.cs
+++ b/src/Lucene.Net.Core/Index/NumericDocValuesWriter.cs
@@ -20,11 +20,11 @@ namespace Lucene.Net.Index
* limitations under the License.
*/
- using AppendingDeltaPackedLongBuffer = Lucene.Net.Util.Packed.AppendingDeltaPackedLongBuffer;
+ using AppendingDeltaPackedInt64Buffer = Lucene.Net.Util.Packed.AppendingDeltaPackedInt64Buffer;
using Counter = Lucene.Net.Util.Counter;
using DocValuesConsumer = Lucene.Net.Codecs.DocValuesConsumer;
using FixedBitSet = Lucene.Net.Util.FixedBitSet;
- using PackedInts = Lucene.Net.Util.Packed.PackedInts;
+ using PackedInt32s = Lucene.Net.Util.Packed.PackedInt32s;
using RamUsageEstimator = Lucene.Net.Util.RamUsageEstimator;
/// <summary>
@@ -35,7 +35,7 @@ namespace Lucene.Net.Index
{
private const long MISSING = 0L;
- private AppendingDeltaPackedLongBuffer pending;
+ private AppendingDeltaPackedInt64Buffer pending;
private readonly Counter iwBytesUsed;
private long bytesUsed;
private FixedBitSet docsWithField;
@@ -43,7 +43,7 @@ namespace Lucene.Net.Index
public NumericDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed, bool trackDocsWithField)
{
- pending = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
+ pending = new AppendingDeltaPackedInt64Buffer(PackedInt32s.COMPACT);
docsWithField = trackDocsWithField ? new FixedBitSet(64) : null;
bytesUsed = pending.RamBytesUsed() + DocsWithFieldBytesUsed();
this.fieldInfo = fieldInfo;
@@ -101,7 +101,7 @@ namespace Lucene.Net.Index
private IEnumerable<long?> GetNumericIterator(int maxDoc)
{
// LUCENENET specific: using yield return instead of custom iterator type. Much less code.
- AbstractAppendingLongBuffer.Iterator iter = pending.GetIterator();
+ AbstractAppendingInt64Buffer.Iterator iter = pending.GetIterator();
int size = (int)pending.Count;
int upto = 0;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/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 b9859c2..de07b6f 100644
--- a/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
+++ b/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Index
public SegmentCommitInfo Info { get; private set; }
// Tracks how many consumers are using this instance:
- private readonly AtomicInteger refCount = new AtomicInteger(1);
+ private readonly AtomicInt32 refCount = new AtomicInt32(1);
private readonly IndexWriter writer;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/SegmentCoreReaders.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/SegmentCoreReaders.cs b/src/Lucene.Net.Core/Index/SegmentCoreReaders.cs
index dd55c47..c9f89ad 100644
--- a/src/Lucene.Net.Core/Index/SegmentCoreReaders.cs
+++ b/src/Lucene.Net.Core/Index/SegmentCoreReaders.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Index
// closed. A given instance of SegmentReader may be
// closed, even though it shares core objects with other
// SegmentReaders:
- private readonly AtomicInteger @ref = new AtomicInteger(1);
+ private readonly AtomicInt32 @ref = new AtomicInt32(1);
internal readonly FieldsProducer fields;
internal readonly DocValuesProducer normsProducer;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/SortedDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/SortedDocValuesWriter.cs b/src/Lucene.Net.Core/Index/SortedDocValuesWriter.cs
index 74022f6..881de17 100644
--- a/src/Lucene.Net.Core/Index/SortedDocValuesWriter.cs
+++ b/src/Lucene.Net.Core/Index/SortedDocValuesWriter.cs
@@ -30,7 +30,7 @@ namespace Lucene.Net.Index
internal class SortedDocValuesWriter : DocValuesWriter
{
internal readonly BytesRefHash hash;
- private AppendingDeltaPackedLongBuffer pending;
+ private AppendingDeltaPackedInt64Buffer pending;
private readonly Counter iwBytesUsed;
private long bytesUsed; // this currently only tracks differences in 'pending'
private readonly FieldInfo fieldInfo;
@@ -42,7 +42,7 @@ namespace Lucene.Net.Index
this.fieldInfo = fieldInfo;
this.iwBytesUsed = iwBytesUsed;
hash = new BytesRefHash(new ByteBlockPool(new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)), BytesRefHash.DEFAULT_CAPACITY, new BytesRefHash.DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
- pending = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
+ pending = new AppendingDeltaPackedInt64Buffer(PackedInt32s.COMPACT);
bytesUsed = pending.RamBytesUsed();
iwBytesUsed.AddAndGet(bytesUsed);
}
@@ -142,7 +142,7 @@ namespace Lucene.Net.Index
private IEnumerable<long?> GetOrdsEnumberable(int maxDoc, int[] ordMap)
{
- AppendingDeltaPackedLongBuffer.Iterator iter = pending.GetIterator();
+ AppendingDeltaPackedInt64Buffer.Iterator iter = pending.GetIterator();
for (int i = 0; i < maxDoc; ++i)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/SortedSetDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/SortedSetDocValuesWriter.cs b/src/Lucene.Net.Core/Index/SortedSetDocValuesWriter.cs
index d20b2ff..a0515ec 100644
--- a/src/Lucene.Net.Core/Index/SortedSetDocValuesWriter.cs
+++ b/src/Lucene.Net.Core/Index/SortedSetDocValuesWriter.cs
@@ -21,8 +21,8 @@ namespace Lucene.Net.Index
* limitations under the License.
*/
- using AppendingDeltaPackedLongBuffer = Lucene.Net.Util.Packed.AppendingDeltaPackedLongBuffer;
- using AppendingPackedLongBuffer = Lucene.Net.Util.Packed.AppendingPackedLongBuffer;
+ using AppendingDeltaPackedInt64Buffer = Lucene.Net.Util.Packed.AppendingDeltaPackedInt64Buffer;
+ using AppendingPackedInt64Buffer = Lucene.Net.Util.Packed.AppendingPackedInt64Buffer;
using ArrayUtil = Lucene.Net.Util.ArrayUtil;
using ByteBlockPool = Lucene.Net.Util.ByteBlockPool;
using BytesRef = Lucene.Net.Util.BytesRef;
@@ -30,7 +30,7 @@ namespace Lucene.Net.Index
using Counter = Lucene.Net.Util.Counter;
using DirectBytesStartArray = Lucene.Net.Util.BytesRefHash.DirectBytesStartArray;
using DocValuesConsumer = Lucene.Net.Codecs.DocValuesConsumer;
- using PackedInts = Lucene.Net.Util.Packed.PackedInts;
+ using PackedInt32s = Lucene.Net.Util.Packed.PackedInt32s;
using RamUsageEstimator = Lucene.Net.Util.RamUsageEstimator;
/// <summary>
@@ -40,8 +40,8 @@ namespace Lucene.Net.Index
internal class SortedSetDocValuesWriter : DocValuesWriter
{
internal readonly BytesRefHash hash;
- private AppendingPackedLongBuffer pending; // stream of all termIDs
- private AppendingDeltaPackedLongBuffer pendingCounts; // termIDs per doc
+ private AppendingPackedInt64Buffer pending; // stream of all termIDs
+ private AppendingDeltaPackedInt64Buffer pendingCounts; // termIDs per doc
private readonly Counter iwBytesUsed;
private long bytesUsed; // this only tracks differences in 'pending' and 'pendingCounts'
private readonly FieldInfo fieldInfo;
@@ -55,8 +55,8 @@ namespace Lucene.Net.Index
this.fieldInfo = fieldInfo;
this.iwBytesUsed = iwBytesUsed;
hash = new BytesRefHash(new ByteBlockPool(new ByteBlockPool.DirectTrackingAllocator(iwBytesUsed)), BytesRefHash.DEFAULT_CAPACITY, new DirectBytesStartArray(BytesRefHash.DEFAULT_CAPACITY, iwBytesUsed));
- pending = new AppendingPackedLongBuffer(PackedInts.COMPACT);
- pendingCounts = new AppendingDeltaPackedLongBuffer(PackedInts.COMPACT);
+ pending = new AppendingPackedInt64Buffer(PackedInt32s.COMPACT);
+ pendingCounts = new AppendingDeltaPackedInt64Buffer(PackedInt32s.COMPACT);
bytesUsed = pending.RamBytesUsed() + pendingCounts.RamBytesUsed();
iwBytesUsed.AddAndGet(bytesUsed);
}
@@ -197,7 +197,7 @@ namespace Lucene.Net.Index
private IEnumerable<long?> GetOrdsEnumberable(int maxDoc)
{
- AppendingDeltaPackedLongBuffer.Iterator iter = pendingCounts.GetIterator();
+ AppendingDeltaPackedInt64Buffer.Iterator iter = pendingCounts.GetIterator();
Debug.Assert(maxDoc == pendingCounts.Count, "MaxDoc: " + maxDoc + ", pending.Count: " + pending.Count);
@@ -210,8 +210,8 @@ namespace Lucene.Net.Index
private IEnumerable<long?> GetOrdCountEnumberable(int maxCountPerDoc, int[] ordMap)
{
int currentUpTo = 0, currentLength = 0;
- AppendingPackedLongBuffer.Iterator iter = pending.GetIterator();
- AppendingDeltaPackedLongBuffer.Iterator counts = pendingCounts.GetIterator();
+ AppendingPackedInt64Buffer.Iterator iter = pending.GetIterator();
+ AppendingDeltaPackedInt64Buffer.Iterator counts = pendingCounts.GetIterator();
int[] currentDoc = new int[maxCountPerDoc];
for (long i = 0; i < pending.Count; ++i)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/TermsHash.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/TermsHash.cs b/src/Lucene.Net.Core/Index/TermsHash.cs
index 51cdf1b..2a0a874 100644
--- a/src/Lucene.Net.Core/Index/TermsHash.cs
+++ b/src/Lucene.Net.Core/Index/TermsHash.cs
@@ -22,7 +22,7 @@ namespace Lucene.Net.Index
using ByteBlockPool = Lucene.Net.Util.ByteBlockPool;
using BytesRef = Lucene.Net.Util.BytesRef;
using Counter = Lucene.Net.Util.Counter;
- using IntBlockPool = Lucene.Net.Util.IntBlockPool;
+ using Int32BlockPool = Lucene.Net.Util.Int32BlockPool;
/// <summary>
/// this class implements <seealso cref="InvertedDocConsumer"/>, which
@@ -38,7 +38,7 @@ namespace Lucene.Net.Index
internal readonly TermsHashConsumer consumer;
internal readonly TermsHash nextTermsHash;
- internal readonly IntBlockPool intPool;
+ internal readonly Int32BlockPool intPool;
internal readonly ByteBlockPool bytePool;
internal ByteBlockPool termBytePool;
internal readonly Counter bytesUsed;
@@ -63,7 +63,7 @@ namespace Lucene.Net.Index
this.trackAllocations = trackAllocations;
this.nextTermsHash = nextTermsHash;
this.bytesUsed = trackAllocations ? docWriter.bytesUsed : Counter.NewCounter();
- intPool = new IntBlockPool(docWriter.intBlockAllocator);
+ intPool = new Int32BlockPool(docWriter.intBlockAllocator);
bytePool = new ByteBlockPool(docWriter.byteBlockAllocator);
if (nextTermsHash != null)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/TermsHashPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/TermsHashPerField.cs b/src/Lucene.Net.Core/Index/TermsHashPerField.cs
index 3b451f6..649be47 100644
--- a/src/Lucene.Net.Core/Index/TermsHashPerField.cs
+++ b/src/Lucene.Net.Core/Index/TermsHashPerField.cs
@@ -26,7 +26,7 @@ namespace Lucene.Net.Index
using BytesRef = Lucene.Net.Util.BytesRef;
using BytesRefHash = Lucene.Net.Util.BytesRefHash;
using Counter = Lucene.Net.Util.Counter;
- using IntBlockPool = Lucene.Net.Util.IntBlockPool;
+ using Int32BlockPool = Lucene.Net.Util.Int32BlockPool;
internal sealed class TermsHashPerField : InvertedDocConsumerPerField
{
@@ -43,7 +43,7 @@ namespace Lucene.Net.Index
internal BytesRef termBytesRef;
// Copied from our perThread
- internal readonly IntBlockPool intPool;
+ internal readonly Int32BlockPool intPool;
internal readonly ByteBlockPool bytePool;
internal readonly ByteBlockPool termBytePool;
@@ -112,8 +112,8 @@ namespace Lucene.Net.Index
{
Debug.Assert(stream < streamCount);
int intStart = postingsArray.intStarts[termID];
- int[] ints = intPool.Buffers[intStart >> IntBlockPool.INT_BLOCK_SHIFT];
- int upto = intStart & IntBlockPool.INT_BLOCK_MASK;
+ int[] ints = intPool.Buffers[intStart >> Int32BlockPool.INT_BLOCK_SHIFT];
+ int upto = intStart & Int32BlockPool.INT_BLOCK_MASK;
reader.Init(bytePool, postingsArray.byteStarts[termID] + stream * ByteBlockPool.FIRST_LEVEL_SIZE, ints[upto + stream]);
}
@@ -160,7 +160,7 @@ namespace Lucene.Net.Index
// First time we are seeing this token since we last
// flushed the hash.
// Init stream slices
- if (numPostingInt + intPool.Int32Upto > IntBlockPool.INT_BLOCK_SIZE)
+ if (numPostingInt + intPool.Int32Upto > Int32BlockPool.INT_BLOCK_SIZE)
{
intPool.NextBuffer();
}
@@ -189,8 +189,8 @@ namespace Lucene.Net.Index
{
termID = (-termID) - 1;
int intStart = postingsArray.intStarts[termID];
- intUptos = intPool.Buffers[intStart >> IntBlockPool.INT_BLOCK_SHIFT];
- intUptoStart = intStart & IntBlockPool.INT_BLOCK_MASK;
+ intUptos = intPool.Buffers[intStart >> Int32BlockPool.INT_BLOCK_SHIFT];
+ intUptoStart = intStart & Int32BlockPool.INT_BLOCK_MASK;
consumer.AddTerm(termID);
}
}
@@ -235,7 +235,7 @@ namespace Lucene.Net.Index
{
bytesHash.ByteStart(termID);
// Init stream slices
- if (numPostingInt + intPool.Int32Upto > IntBlockPool.INT_BLOCK_SIZE)
+ if (numPostingInt + intPool.Int32Upto > Int32BlockPool.INT_BLOCK_SIZE)
{
intPool.NextBuffer();
}
@@ -264,8 +264,8 @@ namespace Lucene.Net.Index
{
termID = (-termID) - 1;
int intStart = postingsArray.intStarts[termID];
- intUptos = intPool.Buffers[intStart >> IntBlockPool.INT_BLOCK_SHIFT];
- intUptoStart = intStart & IntBlockPool.INT_BLOCK_MASK;
+ intUptos = intPool.Buffers[intStart >> Int32BlockPool.INT_BLOCK_SHIFT];
+ intUptoStart = intStart & Int32BlockPool.INT_BLOCK_MASK;
consumer.AddTerm(termID);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Index/TrackingIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/TrackingIndexWriter.cs b/src/Lucene.Net.Core/Index/TrackingIndexWriter.cs
index 9b0d8e5..679bc63 100644
--- a/src/Lucene.Net.Core/Index/TrackingIndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/TrackingIndexWriter.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Index
public class TrackingIndexWriter
{
private readonly IndexWriter writer;
- private readonly AtomicLong indexingGen = new AtomicLong(1);
+ private readonly AtomicInt64 indexingGen = new AtomicInt64(1);
/// <summary>
/// Create a {@code TrackingIndexWriter} wrapping the
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Search/DocTermOrdsRewriteMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/DocTermOrdsRewriteMethod.cs b/src/Lucene.Net.Core/Search/DocTermOrdsRewriteMethod.cs
index 5392ea2..bd79c34 100644
--- a/src/Lucene.Net.Core/Search/DocTermOrdsRewriteMethod.cs
+++ b/src/Lucene.Net.Core/Search/DocTermOrdsRewriteMethod.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Search
using IBits = Lucene.Net.Util.IBits;
using BytesRef = Lucene.Net.Util.BytesRef;
using IndexReader = Lucene.Net.Index.IndexReader;
- using LongBitSet = Lucene.Net.Util.LongBitSet;
+ using Int64BitSet = Lucene.Net.Util.Int64BitSet;
using SortedSetDocValues = Lucene.Net.Index.SortedSetDocValues;
using Terms = Lucene.Net.Index.Terms;
using TermsEnum = Lucene.Net.Index.TermsEnum;
@@ -102,7 +102,7 @@ namespace Lucene.Net.Search
{
SortedSetDocValues docTermOrds = FieldCache.DEFAULT.GetDocTermOrds((context.AtomicReader), m_query.m_field);
// Cannot use FixedBitSet because we require long index (ord):
- LongBitSet termSet = new LongBitSet(docTermOrds.ValueCount);
+ Int64BitSet termSet = new Int64BitSet(docTermOrds.ValueCount);
TermsEnum termsEnum = m_query.GetTermsEnum(new TermsAnonymousInnerClassHelper(this, docTermOrds));
Debug.Assert(termsEnum != null);
@@ -202,9 +202,9 @@ namespace Lucene.Net.Search
private readonly MultiTermQueryDocTermOrdsWrapperFilter outerInstance;
private SortedSetDocValues docTermOrds;
- private LongBitSet termSet;
+ private Int64BitSet termSet;
- public FieldCacheDocIdSetAnonymousInnerClassHelper(MultiTermQueryDocTermOrdsWrapperFilter outerInstance, int maxDoc, IBits acceptDocs, SortedSetDocValues docTermOrds, LongBitSet termSet)
+ public FieldCacheDocIdSetAnonymousInnerClassHelper(MultiTermQueryDocTermOrdsWrapperFilter outerInstance, int maxDoc, IBits acceptDocs, SortedSetDocValues docTermOrds, Int64BitSet termSet)
: base(maxDoc, acceptDocs)
{
this.outerInstance = outerInstance;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b7f4185/src/Lucene.Net.Core/Search/FieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldCache.cs b/src/Lucene.Net.Core/Search/FieldCache.cs
index ea165c9..4e082ea 100644
--- a/src/Lucene.Net.Core/Search/FieldCache.cs
+++ b/src/Lucene.Net.Core/Search/FieldCache.cs
@@ -98,7 +98,7 @@ namespace Lucene.Net.Search
/// <exception cref="IOException"> If any error occurs. </exception>
/// @deprecated (4.4) Index as a numeric field using <seealso cref="IntField"/> and then use <seealso cref="#getInts(AtomicReader, String, boolean)"/> instead.
[Obsolete("(4.4) Index as a numeric field using Int32Field and then use GetInt32s(AtomicReader, string, bool) instead.")]
- FieldCache.Shorts GetInt16s(AtomicReader reader, string field, bool setDocsWithField);
+ FieldCache.Int16s GetInt16s(AtomicReader reader, string field, bool setDocsWithField);
/// <summary>
/// Checks the internal cache for an appropriate entry, and if none is found,
@@ -117,19 +117,19 @@ namespace Lucene.Net.Search
/// <exception cref="IOException"> If any error occurs. </exception>
/// @deprecated (4.4) Index as a numeric field using <seealso cref="IntField"/> and then use <seealso cref="#getInts(AtomicReader, String, boolean)"/> instead.
[Obsolete("(4.4) Index as a numeric field using Int32Field and then use GetInt32s(AtomicReader, string, bool) instead.")]
- FieldCache.Shorts GetInt16s(AtomicReader reader, string field, FieldCache.IShortParser parser, bool setDocsWithField);
+ FieldCache.Int16s GetInt16s(AtomicReader reader, string field, FieldCache.IInt16Parser parser, bool setDocsWithField);
/// <summary>
- /// Returns an <seealso cref="FieldCache.Ints"/> over the values found in documents in the given
+ /// Returns an <seealso cref="FieldCache.Int32s"/> over the values found in documents in the given
/// field.
/// <para/>
/// NOTE: this was getInts() in Lucene
/// </summary>
/// <seealso cref= #getInts(AtomicReader, String, IntParser, boolean) </seealso>
- FieldCache.Ints GetInt32s(AtomicReader reader, string field, bool setDocsWithField);
+ FieldCache.Int32s GetInt32s(AtomicReader reader, string field, bool setDocsWithField);
/// <summary>
- /// Returns an <seealso cref="FieldCache.Ints"/> over the values found in documents in the given
+ /// Returns an <seealso cref="FieldCache.Int32s"/> over the values found in documents in the given
/// field. If the field was indexed as <seealso cref="NumericDocValuesField"/>, it simply
/// uses <seealso cref="AtomicReader#getNumericDocValues(String)"/> to read the values.
/// Otherwise, it checks the internal cache for an appropriate entry, and if
@@ -153,7 +153,7 @@ namespace Lucene.Net.Search
/// <returns> The values in the given field for each document. </returns>
/// <exception cref="IOException">
/// If any error occurs. </exception>
- FieldCache.Ints GetInt32s(AtomicReader reader, string field, FieldCache.IIntParser parser, bool setDocsWithField);
+ FieldCache.Int32s GetInt32s(AtomicReader reader, string field, FieldCache.IInt32Parser parser, bool setDocsWithField);
/// <summary>
/// Returns a <seealso cref="Floats"/> over the values found in documents in the given
@@ -162,7 +162,7 @@ namespace Lucene.Net.Search
/// NOTE: this was getFloats() in Lucene
/// </summary>
/// <seealso cref= #getFloats(AtomicReader, String, FloatParser, boolean) </seealso>
- FieldCache.Floats GetSingles(AtomicReader reader, string field, bool setDocsWithField);
+ FieldCache.Singles GetSingles(AtomicReader reader, string field, bool setDocsWithField);
/// <summary>
/// Returns a <seealso cref="Floats"/> over the values found in documents in the given
@@ -189,7 +189,7 @@ namespace Lucene.Net.Search
/// <returns> The values in the given field for each document. </returns>
/// <exception cref="IOException">
/// If any error occurs. </exception>
- FieldCache.Floats GetSingles(AtomicReader reader, string field, FieldCache.IFloatParser parser, bool setDocsWithField);
+ FieldCache.Singles GetSingles(AtomicReader reader, string field, FieldCache.ISingleParser parser, bool setDocsWithField);
/// <summary>
/// Returns a <seealso cref="Longs"/> over the values found in documents in the given
@@ -198,7 +198,7 @@ namespace Lucene.Net.Search
/// NOTE: this was getLongs() in Lucene
/// </summary>
/// <seealso cref= #getLongs(AtomicReader, String, LongParser, boolean) </seealso>
- FieldCache.Longs GetInt64s(AtomicReader reader, string field, bool setDocsWithField);
+ FieldCache.Int64s GetInt64s(AtomicReader reader, string field, bool setDocsWithField);
/// <summary>
/// Returns a <seealso cref="Longs"/> over the values found in documents in the given
@@ -225,7 +225,7 @@ namespace Lucene.Net.Search
/// <returns> The values in the given field for each document. </returns>
/// <exception cref="IOException">
/// If any error occurs. </exception>
- FieldCache.Longs GetInt64s(AtomicReader reader, string field, FieldCache.ILongParser parser, bool setDocsWithField);
+ FieldCache.Int64s GetInt64s(AtomicReader reader, string field, FieldCache.IInt64Parser parser, bool setDocsWithField);
/// <summary>
/// Returns a <seealso cref="Doubles"/> over the values found in documents in the given
@@ -383,13 +383,19 @@ namespace Lucene.Net.Search
}
}
- public abstract class Shorts // LUCENENET TODO: Rename Int16s
+ /// <summary>
+ /// NOTE: This was Shorts in Lucene
+ /// </summary>
+ public abstract class Int16s
{
public abstract short Get(int docID);
- public static readonly Shorts EMPTY = new EmptyShorts();
+ public static readonly Int16s EMPTY = new EmptyInt16s();
- public sealed class EmptyShorts : Shorts // LUCENENET TODO: Rename EmptyInt16s
+ /// <summary>
+ /// NOTE: This was EmptyShorts in Lucene
+ /// </summary>
+ public sealed class EmptyInt16s : Int16s
{
public override short Get(int docID)
{
@@ -398,13 +404,19 @@ namespace Lucene.Net.Search
}
}
- public abstract class Ints // LUCENENET TODO: Rename Int32s
+ /// <summary>
+ /// NOTE: This was Ints in Lucene
+ /// </summary>
+ public abstract class Int32s
{
public abstract int Get(int docID);
- public static readonly Ints EMPTY = new EmptyInts();
+ public static readonly Int32s EMPTY = new EmptyInt32s();
- public sealed class EmptyInts : Ints // LUCENENET TODO: Rename EmptyInt32s
+ /// <summary>
+ /// NOTE: This was EmptyInts in Lucene
+ /// </summary>
+ public sealed class EmptyInt32s : Int32s
{
public override int Get(int docID)
{
@@ -413,13 +425,19 @@ namespace Lucene.Net.Search
}
}
- public abstract class Longs // LUCENENET TODO: Rename Int64s
+ /// <summary>
+ /// NOTE: This was Longs in Lucene
+ /// </summary>
+ public abstract class Int64s
{
public abstract long Get(int docID);
- public static readonly Longs EMPTY = new EmptyLongs();
+ public static readonly Int64s EMPTY = new EmptyInt64s();
- public sealed class EmptyLongs : Longs // LUCENENET TODO: Rename EmptyInt64s
+ /// <summary>
+ /// NOTE: This was EmptyLongs in Lucene
+ /// </summary>
+ public sealed class EmptyInt64s : Int64s
{
public override long Get(int docID)
{
@@ -428,13 +446,19 @@ namespace Lucene.Net.Search
}
}
- public abstract class Floats // LUCENENET TODO: Rename Singles
+ /// <summary>
+ /// NOTE: This was Floats in Lucene
+ /// </summary>
+ public abstract class Singles
{
public abstract float Get(int docID);
- public static readonly Floats EMPTY = new EmptyFloats();
+ public static readonly Singles EMPTY = new EmptySingles();
- public sealed class EmptyFloats : Floats // LUCENENET TODO: Rename EmptySingles
+ /// <summary>
+ /// NOTE: This was EmptySingles in Lucene
+ /// </summary>
+ public sealed class EmptySingles : Singles
{
public override float Get(int docID)
{
@@ -473,7 +497,10 @@ namespace Lucene.Net.Search
sbyte ParseByte(BytesRef term); // LUCENENET TODO: can this be byte?
}
- public interface IShortParser : IParser // LUCENENET TODO: Rename IInt16Parser
+ /// <summary>
+ /// NOTE: This was ShortParser in Lucene
+ /// </summary>
+ public interface IInt16Parser : IParser
{
/// <summary>
/// NOTE: This was parseShort() in Lucene
@@ -481,7 +508,10 @@ namespace Lucene.Net.Search
short ParseInt16(BytesRef term);
}
- public interface IIntParser : IParser // LUCENENET TODO: Rename IInt32Parser
+ /// <summary>
+ /// NOTE: This was IntParser in Lucene
+ /// </summary>
+ public interface IInt32Parser : IParser
{
/// <summary>
/// NOTE: This was parseInt() in Lucene
@@ -489,7 +519,10 @@ namespace Lucene.Net.Search
int ParseInt32(BytesRef term);
}
- public interface IFloatParser : IParser // LUCENENET TODO: Rename ISingleParser
+ /// <summary>
+ /// NOTE: This was FloatParser in Lucene
+ /// </summary>
+ public interface ISingleParser : IParser
{
/// <summary>
/// NOTE: This was parseFloat() in Lucene
@@ -497,7 +530,10 @@ namespace Lucene.Net.Search
float ParseSingle(BytesRef term);
}
- public interface ILongParser : IParser // LUCENENET TODO: Rename IInt64Parser
+ /// <summary>
+ /// NOTE: This was LongParser in Lucene
+ /// </summary>
+ public interface IInt64Parser : IParser
{
/// <summary>
/// NOTE: This was parseLong() in Lucene
@@ -536,9 +572,10 @@ namespace Lucene.Net.Search
}
}
- public static readonly IShortParser DEFAULT_SHORT_PARSER = new AnonymousShortParser(); // LUCENENET TODO: Rename DEFAULT_INT16_PARSER
+ public static readonly IInt16Parser DEFAULT_SHORT_PARSER = new AnonymousInt16Parser(); // LUCENENET TODO: Rename DEFAULT_INT16_PARSER
+
- private sealed class AnonymousShortParser : IShortParser
+ private sealed class AnonymousInt16Parser : IInt16Parser
{
/// <summary>
/// NOTE: This was parseShort() in Lucene
@@ -563,9 +600,9 @@ namespace Lucene.Net.Search
}
}
- public static readonly IIntParser DEFAULT_INT_PARSER = new AnonymousIntParser(); // LUCENENET TODO: Rename DEFAULT_INT32_PARSER
+ public static readonly IInt32Parser DEFAULT_INT_PARSER = new AnonymousInt32Parser(); // LUCENENET TODO: Rename DEFAULT_INT32_PARSER
- private sealed class AnonymousIntParser : IIntParser
+ private sealed class AnonymousInt32Parser : IInt32Parser
{
/// <summary>
/// NOTE: This was parseInt() in Lucene
@@ -590,9 +627,9 @@ namespace Lucene.Net.Search
}
}
- public static readonly IFloatParser DEFAULT_FLOAT_PARSER = new AnonymousFloatParser(); // LUCENENET TODO: Rename DEFAULT_SINGLE_PARSER
+ public static readonly ISingleParser DEFAULT_FLOAT_PARSER = new AnonymousSingleParser(); // LUCENENET TODO: Rename DEFAULT_SINGLE_PARSER
- private sealed class AnonymousFloatParser : IFloatParser
+ private sealed class AnonymousSingleParser : ISingleParser
{
/// <summary>
/// NOTE: This was parseFloat() in Lucene
@@ -621,9 +658,9 @@ namespace Lucene.Net.Search
}
}
- public static readonly ILongParser DEFAULT_LONG_PARSER = new AnonymousLongParser(); // LUCENENET TODO: Rename DEFAULT_INT64_PARSER
+ public static readonly IInt64Parser DEFAULT_LONG_PARSER = new AnonymousInt64Parser(); // LUCENENET TODO: Rename DEFAULT_INT64_PARSER
- private sealed class AnonymousLongParser : ILongParser
+ private sealed class AnonymousInt64Parser : IInt64Parser
{
/// <summary>
/// NOTE: This was parseLong() in Lucene
@@ -672,9 +709,9 @@ namespace Lucene.Net.Search
}
}
- public static readonly IIntParser NUMERIC_UTILS_INT_PARSER = new AnonymousNumericUtilsIntParser();
+ public static readonly IInt32Parser NUMERIC_UTILS_INT_PARSER = new AnonymousNumericUtilsInt32Parser(); // LUCENENET TODO: Rename NUMERIC_UTILS_INT32_PARSER
- private sealed class AnonymousNumericUtilsIntParser : IIntParser
+ private sealed class AnonymousNumericUtilsInt32Parser : IInt32Parser
{
/// <summary>
/// NOTE: This was parseInt() in Lucene
@@ -695,9 +732,9 @@ namespace Lucene.Net.Search
}
}
- public static readonly IFloatParser NUMERIC_UTILS_FLOAT_PARSER = new AnonymousNumericUtilsFloatParser();
+ public static readonly ISingleParser NUMERIC_UTILS_FLOAT_PARSER = new AnonymousNumericUtilsSingleParser(); // LUCENENET TODO: Rename NUMERIC_UTILS_SINGLE_PARSER
- private sealed class AnonymousNumericUtilsFloatParser : IFloatParser
+ private sealed class AnonymousNumericUtilsSingleParser : ISingleParser
{
/// <summary>
/// NOTE: This was parseFloat() in Lucene
@@ -718,9 +755,9 @@ namespace Lucene.Net.Search
}
}
- public static readonly ILongParser NUMERIC_UTILS_LONG_PARSER = new AnonymousNumericUtilsLongParser();
+ public static readonly IInt64Parser NUMERIC_UTILS_LONG_PARSER = new AnonymousNumericUtilsInt64Parser(); // LUCENENET TODO: Rename NUMERIC_UTILS_INT64_PARSER
- private sealed class AnonymousNumericUtilsLongParser : ILongParser
+ private sealed class AnonymousNumericUtilsInt64Parser : IInt64Parser
{
/// <summary>
/// NOTE: This was parseLong() in Lucene