internal virtual Int64Values GetNumeric(NumericEntry entry) { IndexInput data = (IndexInput)this.data.Clone(); data.Seek(entry.Offset); switch (entry.format) { case Lucene45DocValuesConsumer.DELTA_COMPRESSED: BlockPackedReader reader = new BlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, entry.Count, true); return(reader); case Lucene45DocValuesConsumer.GCD_COMPRESSED: long min = entry.minValue; long mult = entry.gcd; BlockPackedReader quotientReader = new BlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, entry.Count, true); return(new Int64ValuesAnonymousInnerClassHelper(min, mult, quotientReader)); case Lucene45DocValuesConsumer.TABLE_COMPRESSED: long[] table = entry.table; int bitsRequired = PackedInt32s.BitsRequired(table.Length - 1); PackedInt32s.Reader ords = PackedInt32s.GetDirectReaderNoHeader(data, PackedInt32s.Format.PACKED, entry.PackedInt32sVersion, (int)entry.Count, bitsRequired); return(new Int64ValuesAnonymousInnerClassHelper2(table, ords)); default: throw new Exception(); } }
public SortedDocValuesAnonymousInnerClassHelper(Lucene45DocValuesProducer outerInstance, int valueCount, BinaryDocValues binary, BlockPackedReader ordinals) { this.outerInstance = outerInstance; this.valueCount = valueCount; this.binary = binary; this.ordinals = ordinals; }
public NumericDocValuesAnonymousInnerClassHelper3(MemoryDocValuesProducer outerInstance, long min, long mult, BlockPackedReader quotientReader) { this.min = min; this.mult = mult; this.quotientReader = quotientReader; }
public Int64ValuesAnonymousInnerClassHelper(Lucene45DocValuesProducer outerInstance, long min, long mult, BlockPackedReader quotientReader) { this.outerInstance = outerInstance; this.min = min; this.mult = mult; this.quotientReader = quotientReader; }
public NumericDocValuesAnonymousClass3(long min, long mult, BlockPackedReader quotientReader) { this.min = min; this.mult = mult; this.quotientReader = quotientReader; }
public NumericDocValuesAnonymousInnerClassHelper3(Lucene42DocValuesProducer outerInstance, long min, long mult, BlockPackedReader quotientReader) { this.OuterInstance = outerInstance; this.Min = min; this.Mult = mult; this.QuotientReader = quotientReader; }
public override SortedDocValues GetSorted(FieldInfo field) { int valueCount = (int)binaries[field.Number].Count; BinaryDocValues binary = GetBinary(field); NumericEntry entry = ords[field.Number]; IndexInput data = (IndexInput)this.data.Clone(); data.Seek(entry.Offset); BlockPackedReader ordinals = new BlockPackedReader(data, entry.PackedInt32sVersion, entry.BlockSize, entry.Count, true); return(new SortedDocValuesAnonymousInnerClassHelper(valueCount, binary, ordinals)); }
private NumericDocValues LoadNumeric(FieldInfo field) { NumericEntry entry = numerics[field.Number]; data.Seek(entry.offset + entry.missingBytes); switch (entry.format) { case TABLE_COMPRESSED: int size = data.ReadVInt32(); if (size > 256) { throw new CorruptIndexException( "TABLE_COMPRESSED cannot have more than 256 distinct values, input=" + data); } var decode = new long[size]; for (int i = 0; i < decode.Length; i++) { decode[i] = data.ReadInt64(); } int formatID = data.ReadVInt32(); int bitsPerValue = data.ReadVInt32(); var ordsReader = PackedInt32s.GetReaderNoHeader(data, PackedInt32s.Format.ById(formatID), entry.packedIntsVersion, maxDoc, bitsPerValue); ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(decode) + ordsReader.RamBytesUsed()); return(new NumericDocValuesAnonymousInnerClassHelper(this, decode, ordsReader)); case DELTA_COMPRESSED: int blockSize = data.ReadVInt32(); var reader = new BlockPackedReader(data, entry.packedIntsVersion, blockSize, maxDoc, false); ramBytesUsed.AddAndGet(reader.RamBytesUsed()); return(reader); case UNCOMPRESSED: var bytes = new byte[maxDoc]; data.ReadBytes(bytes, 0, bytes.Length); ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(bytes)); // LUCENENET: IMPORTANT - some bytes are negative here, so we need to pass as sbyte return(new NumericDocValuesAnonymousInnerClassHelper2(this, (sbyte[])(Array)bytes)); case GCD_COMPRESSED: long min = data.ReadInt64(); long mult = data.ReadInt64(); int quotientBlockSize = data.ReadVInt32(); var quotientReader = new BlockPackedReader(data, entry.packedIntsVersion, quotientBlockSize, maxDoc, false); ramBytesUsed.AddAndGet(quotientReader.RamBytesUsed()); return(new NumericDocValuesAnonymousInnerClassHelper3(this, min, mult, quotientReader)); default: throw new InvalidOperationException(); } }
private NumericDocValues LoadNumeric(FieldInfo field) { NumericEntry entry = numerics[field.Number]; data.Seek(entry.Offset); switch (entry.Format) { case TABLE_COMPRESSED: int size = data.ReadVInt32(); if (size > 256) { throw new CorruptIndexException("TABLE_COMPRESSED cannot have more than 256 distinct values, input=" + data); } var decode = new long[size]; for (int i = 0; i < decode.Length; i++) { decode[i] = data.ReadInt64(); } int formatID = data.ReadVInt32(); int bitsPerValue = data.ReadVInt32(); PackedInt32s.Reader ordsReader = PackedInt32s.GetReaderNoHeader(data, PackedInt32s.Format.ById(formatID), entry.PackedInt32sVersion, maxDoc, bitsPerValue); ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(decode) + ordsReader.RamBytesUsed()); return(new NumericDocValuesAnonymousClass(decode, ordsReader)); case DELTA_COMPRESSED: int blockSize = data.ReadVInt32(); var reader = new BlockPackedReader(data, entry.PackedInt32sVersion, blockSize, maxDoc, false); ramBytesUsed.AddAndGet(reader.RamBytesUsed()); return(reader); case UNCOMPRESSED: byte[] bytes = new byte[maxDoc]; data.ReadBytes(bytes, 0, bytes.Length); ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(bytes)); return(new NumericDocValuesAnonymousClass2(bytes)); case GCD_COMPRESSED: long min = data.ReadInt64(); long mult = data.ReadInt64(); int quotientBlockSize = data.ReadVInt32(); BlockPackedReader quotientReader = new BlockPackedReader(data, entry.PackedInt32sVersion, quotientBlockSize, maxDoc, false); ramBytesUsed.AddAndGet(quotientReader.RamBytesUsed()); return(new NumericDocValuesAnonymousClass3(min, mult, quotientReader)); default: throw AssertionError.Create(); } }
private NumericDocValues LoadNumeric(FieldInfo field) { NumericEntry entry = Numerics[field.Number]; Data.Seek(entry.Offset); switch (entry.Format) { case TABLE_COMPRESSED: int size = Data.ReadVInt(); if (size > 256) { throw new CorruptIndexException("TABLE_COMPRESSED cannot have more than 256 distinct values, input=" + Data); } long[] decode = new long[size]; for (int i = 0; i < decode.Length; i++) { decode[i] = Data.ReadLong(); } int formatID = Data.ReadVInt(); int bitsPerValue = Data.ReadVInt(); PackedInts.Reader ordsReader = PackedInts.GetReaderNoHeader(Data, PackedInts.Format.ById(formatID), entry.PackedIntsVersion, MaxDoc, bitsPerValue); RamBytesUsed_Renamed.AddAndGet(RamUsageEstimator.SizeOf(decode) + ordsReader.RamBytesUsed()); return(new NumericDocValuesAnonymousInnerClassHelper(this, decode, ordsReader)); case DELTA_COMPRESSED: int blockSize = Data.ReadVInt(); BlockPackedReader reader = new BlockPackedReader(Data, entry.PackedIntsVersion, blockSize, MaxDoc, false); RamBytesUsed_Renamed.AddAndGet(reader.RamBytesUsed()); return(reader); case UNCOMPRESSED: byte[] bytes = new byte[MaxDoc]; Data.ReadBytes(bytes, 0, bytes.Length); RamBytesUsed_Renamed.AddAndGet(RamUsageEstimator.SizeOf(bytes)); return(new NumericDocValuesAnonymousInnerClassHelper2(this, bytes)); case GCD_COMPRESSED: long min = Data.ReadLong(); long mult = Data.ReadLong(); int quotientBlockSize = Data.ReadVInt(); BlockPackedReader quotientReader = new BlockPackedReader(Data, entry.PackedIntsVersion, quotientBlockSize, MaxDoc, false); RamBytesUsed_Renamed.AddAndGet(quotientReader.RamBytesUsed()); return(new NumericDocValuesAnonymousInnerClassHelper3(this, min, mult, quotientReader)); default: throw new InvalidOperationException(); } }
public Int64ValuesAnonymousInnerClassHelper(long min, long mult, BlockPackedReader quotientReader) { this.min = min; this.mult = mult; this.quotientReader = quotientReader; }
public NumericDocValuesAnonymousInnerClassHelper3(long min, long mult, BlockPackedReader quotientReader) { this.Min = min; this.Mult = mult; this.QuotientReader = quotientReader; }
private NumericDocValues LoadNumeric(FieldInfo field) { NumericEntry entry = Numerics[field.Number]; Data.Seek(entry.Offset); switch (entry.Format) { case TABLE_COMPRESSED: int size = Data.ReadVInt(); if (size > 256) { throw new CorruptIndexException("TABLE_COMPRESSED cannot have more than 256 distinct values, input=" + Data); } long[] decode = new long[size]; for (int i = 0; i < decode.Length; i++) { decode[i] = Data.ReadLong(); } int formatID = Data.ReadVInt(); int bitsPerValue = Data.ReadVInt(); PackedInts.Reader ordsReader = PackedInts.GetReaderNoHeader(Data, PackedInts.Format.ById(formatID), entry.PackedIntsVersion, MaxDoc, bitsPerValue); RamBytesUsed_Renamed.AddAndGet(RamUsageEstimator.SizeOf(decode) + ordsReader.RamBytesUsed()); return new NumericDocValuesAnonymousInnerClassHelper(this, decode, ordsReader); case DELTA_COMPRESSED: int blockSize = Data.ReadVInt(); BlockPackedReader reader = new BlockPackedReader(Data, entry.PackedIntsVersion, blockSize, MaxDoc, false); RamBytesUsed_Renamed.AddAndGet(reader.RamBytesUsed()); return reader; case UNCOMPRESSED: byte[] bytes = new byte[MaxDoc]; Data.ReadBytes(bytes, 0, bytes.Length); RamBytesUsed_Renamed.AddAndGet(RamUsageEstimator.SizeOf(bytes)); return new NumericDocValuesAnonymousInnerClassHelper2(this, bytes); case GCD_COMPRESSED: long min = Data.ReadLong(); long mult = Data.ReadLong(); int quotientBlockSize = Data.ReadVInt(); BlockPackedReader quotientReader = new BlockPackedReader(Data, entry.PackedIntsVersion, quotientBlockSize, MaxDoc, false); RamBytesUsed_Renamed.AddAndGet(quotientReader.RamBytesUsed()); return new NumericDocValuesAnonymousInnerClassHelper3(this, min, mult, quotientReader); default: throw new InvalidOperationException(); } }
public SortedDocValuesAnonymousInnerClassHelper(int valueCount, BinaryDocValues binary, BlockPackedReader ordinals) { this.valueCount = valueCount; this.binary = binary; this.ordinals = ordinals; }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: private index.NumericDocValues loadNumeric(index.FieldInfo field) throws java.io.IOException private NumericDocValues loadNumeric(FieldInfo field) { NumericEntry entry = numerics[field.number]; data.seek(entry.offset + entry.missingBytes); switch (entry.format) { case TABLE_COMPRESSED: int size = data.readVInt(); if (size > 256) { throw new CorruptIndexException("TABLE_COMPRESSED cannot have more than 256 distinct values, input=" + data); } //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final long decode[] = new long[size]; long[] decode = new long[size]; for (int i = 0; i < decode.Length; i++) { decode[i] = data.readLong(); } //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final int formatID = data.readVInt(); int formatID = data.readVInt(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final int bitsPerValue = data.readVInt(); int bitsPerValue = data.readVInt(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final util.packed.PackedInts.Reader ordsReader = util.packed.PackedInts.getReaderNoHeader(data, util.packed.PackedInts.Format.byId(formatID), entry.packedIntsVersion, maxDoc, bitsPerValue); PackedInts.Reader ordsReader = PackedInts.getReaderNoHeader(data, PackedInts.Format.byId(formatID), entry.packedIntsVersion, maxDoc, bitsPerValue); ramBytesUsed_Renamed.addAndGet(RamUsageEstimator.sizeOf(decode) + ordsReader.ramBytesUsed()); return(new NumericDocValuesAnonymousInnerClassHelper(this, decode, ordsReader)); case DELTA_COMPRESSED: //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final int blockSize = data.readVInt(); int blockSize = data.readVInt(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final util.packed.BlockPackedReader reader = new util.packed.BlockPackedReader(data, entry.packedIntsVersion, blockSize, maxDoc, false); BlockPackedReader reader = new BlockPackedReader(data, entry.packedIntsVersion, blockSize, maxDoc, false); ramBytesUsed_Renamed.addAndGet(reader.ramBytesUsed()); return(reader); case UNCOMPRESSED: //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final byte bytes[] = new byte[maxDoc]; sbyte[] bytes = new sbyte[maxDoc]; data.readBytes(bytes, 0, bytes.Length); ramBytesUsed_Renamed.addAndGet(RamUsageEstimator.sizeOf(bytes)); return(new NumericDocValuesAnonymousInnerClassHelper2(this, bytes)); case GCD_COMPRESSED: //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final long min = data.readLong(); long min = data.readLong(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final long mult = data.readLong(); long mult = data.readLong(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final int quotientBlockSize = data.readVInt(); int quotientBlockSize = data.readVInt(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final util.packed.BlockPackedReader quotientReader = new util.packed.BlockPackedReader(data, entry.packedIntsVersion, quotientBlockSize, maxDoc, false); BlockPackedReader quotientReader = new BlockPackedReader(data, entry.packedIntsVersion, quotientBlockSize, maxDoc, false); ramBytesUsed_Renamed.addAndGet(quotientReader.ramBytesUsed()); return(new NumericDocValuesAnonymousInnerClassHelper3(this, min, mult, quotientReader)); default: throw new AssertionError(); } }