protected static class UniqueBlockAgg.UniqueBlockSlotAcc extends SlotAcc
SlotAcc.DoubleFuncSlotAcc, SlotAcc.FuncSlotAcc, SlotAcc.IntSlotAcc, SlotAcc.LongFuncSlotAcc, SlotAcc.Resizer, SlotAcc.SlotContext| Modifier and Type | Field and Description |
|---|---|
protected int[] |
lastSeenValuesPerSlot |
currentDocBase, currentReaderContext, fcontext| Modifier | Constructor and Description |
|---|---|
protected |
UniqueBlockSlotAcc(FacetContext fcontext,
SchemaField field,
int numSlots) |
| Modifier and Type | Method and Description |
|---|---|
void |
calcCounts() |
void |
collect(int doc,
int slotNum,
IntFunction<SlotAcc.SlotContext> slotContext)
All subclasses must override this method to collect documents.
|
protected void |
collectOrdToSlot(int slotNum,
int ord) |
int |
compare(int slotA,
int slotB) |
Object |
getValue(int slot) |
protected BytesRef |
lookupOrd(int ord) |
void |
reset()
Called to reset the acc to a fresh state, ready for reuse
|
void |
resetIterators()
Typically called from setNextReader to reset docValue iterators
|
void |
resize(SlotAcc.Resizer resizer) |
void |
setNextReader(LeafReaderContext readerContext)
NOTE: this currently detects when it is being reused and calls resetIterators by comparing reader ords
with previous calls to setNextReader.
|
protected UniqueBlockSlotAcc(FacetContext fcontext, SchemaField field, int numSlots) throws IOException
IOExceptionprotected void collectOrdToSlot(int slotNum,
int ord)
public void calcCounts()
public void reset()
throws IOException
SlotAccIOExceptionpublic void resize(SlotAcc.Resizer resizer)
public Object getValue(int slot) throws IOException
IOExceptionpublic void resetIterators()
throws IOException
SlotAccresetIterators in class SlotAccIOExceptionprotected BytesRef lookupOrd(int ord) throws IOException
IOExceptionpublic void setNextReader(LeafReaderContext readerContext) throws IOException
SlotAccsetNextReader in class SlotAccIOExceptionpublic void collect(int doc,
int slotNum,
IntFunction<SlotAcc.SlotContext> slotContext)
throws IOException
SlotAccSlotAcc.collect(DocSet, int, IntFunction) but it's also neccessary if this accumulator
is used for sorting.collect in class SlotAccdoc - Single Segment docId (relative to the current LeafReaderContext to collectslotNum - The slot number to collect this document inslotContext - A callback that can be used for Accumulators that would like additional info
about the current slot -- the IntFunction is only garunteed to be valid for
the current slot, and the SlotAcc.SlotContext returned is only valid for the duration
of the collect() call.IOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.