Package org.apache.solr.search.facet
Class DocValuesAcc
- java.lang.Object
-
- org.apache.solr.search.facet.SlotAcc
-
- org.apache.solr.search.facet.DocValuesAcc
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public abstract class DocValuesAcc extends SlotAcc
Accumulates stats separated by slot number for the fields withDocValues
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.search.facet.SlotAcc
SlotAcc.DoubleFuncSlotAcc, SlotAcc.FuncSlotAcc, SlotAcc.IntSlotAcc, SlotAcc.LongFuncSlotAcc, SlotAcc.Resizer, SlotAcc.SlotContext
-
-
Field Summary
-
Fields inherited from class org.apache.solr.search.facet.SlotAcc
currentDocBase, currentReaderContext, fcontext
-
-
Constructor Summary
Constructors Constructor Description DocValuesAcc(FacetContext fcontext, SchemaField sf)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanadvanceExact(int doc)Wrapper toorg.apache.lucene.index.DocValuesIterator#advanceExact(int)returns whether or not givendochas valuevoidcollect(int doc, int slot, IntFunction<SlotAcc.SlotContext> slotContext)All subclasses must override this method to collect documents.protected abstract voidcollectValues(int doc, int slot)
-
-
-
Constructor Detail
-
DocValuesAcc
public DocValuesAcc(FacetContext fcontext, SchemaField sf) throws IOException
- Throws:
IOException
-
-
Method Detail
-
collect
public void collect(int doc, int slot, IntFunction<SlotAcc.SlotContext> slotContext) throws IOExceptionDescription copied from class:SlotAccAll subclasses must override this method to collect documents. This method is called by the default impl ofSlotAcc.collect(DocSet, int, IntFunction)but it's also neccessary if this accumulator is used for sorting.- Specified by:
collectin classSlotAcc- Parameters:
doc- Single Segment docId (relative to the currentLeafReaderContextto collectslot- 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 -- theIntFunctionis only garunteed to be valid for the current slot, and theSlotAcc.SlotContextreturned is only valid for the duration of thecollect()call.- Throws:
IOException
-
collectValues
protected abstract void collectValues(int doc, int slot) throws IOException- Throws:
IOException
-
advanceExact
protected abstract boolean advanceExact(int doc) throws IOExceptionWrapper toorg.apache.lucene.index.DocValuesIterator#advanceExact(int)returns whether or not givendochas value- Throws:
IOException
-
-