OrdinalsStore(int maxDoc, int startBitsPerValue, float acceptableOverheadRatio) { this.startBitsPerValue = startBitsPerValue; this.acceptableOverheadRatio = acceptableOverheadRatio; positions = new PagedGrowableWriter(maxDoc, PAGE_SIZE, startBitsPerValue, acceptableOverheadRatio); firstOrdinals = new GrowableWriter(startBitsPerValue, maxDoc, acceptableOverheadRatio); // over allocate in order to never worry about the array sizes, 24 entries would allow to store several millions of ordinals per doc... ordinals = new PagedGrowableWriter[24]; nextLevelSlices = new PagedGrowableWriter[24]; sizes = new int[24]; Arrays.fill(sizes, 1); // reserve the 1st slice on every level }
Iterator(int size, PagedGrowableWriter offsets, PagedGrowableWriter lengths, PagedMutable docs, BytesRef values) { this.offsets = offsets; this.size = size; this.lengths = lengths; this.docs = docs; value = values.clone(); }
public BinaryDocValuesFieldUpdates(String field, int maxDoc) { super(field, FieldInfo.DocValuesType.BINARY); bitsPerValue = PackedInts.bitsRequired(maxDoc - 1); docs = new PagedMutable(1, PAGE_SIZE, bitsPerValue, PackedInts.COMPACT); offsets = new PagedGrowableWriter(1, PAGE_SIZE, 1, PackedInts.FAST); lengths = new PagedGrowableWriter(1, PAGE_SIZE, 1, PackedInts.FAST); values = new BytesRefBuilder(); size = 0; }
public NumericDocValuesFieldUpdates(String field, int maxDoc) { super(field, FieldInfo.DocValuesType.NUMERIC); bitsPerValue = PackedInts.bitsRequired(maxDoc - 1); docs = new PagedMutable(1, PAGE_SIZE, bitsPerValue, PackedInts.COMPACT); values = new PagedGrowableWriter(1, PAGE_SIZE, 1, PackedInts.FAST); size = 0; }
Iterator(int size, PagedGrowableWriter values, PagedMutable docs) { this.size = size; this.values = values; this.docs = docs; }
public NodeHash(FST<T> fst, FST.BytesReader in) { table = new PagedGrowableWriter(16, 1<<27, 8, PackedInts.COMPACT); mask = 15; this.fst = fst; this.in = in; }
public PackedNumericFieldUpdates(int maxDoc) { docsWithField = new FixedBitSet(64); docs = new PagedMutable(1, 1024, PackedInts.bitsRequired(maxDoc - 1), PackedInts.COMPACT); values = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST); size = 0; }
public NodeHash(FST<T> fst, FST.BytesReader in) { table = new PagedGrowableWriter(16, 1<<30, 8, PackedInts.COMPACT); mask = 15; this.fst = fst; this.in = in; }