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
Accumulates stats separated by slot number for the fields with
DocValues-
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 Details
-
DocValuesAcc
- Throws:
IOException
-
-
Method Details
-
collect
public void collect(int doc, int slot, IntFunction<SlotAcc.SlotContext> slotContext) throws IOException Description 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
- Throws:
IOException
-
advanceExact
Wrapper toorg.apache.lucene.index.DocValuesIterator#advanceExact(int)returns whether or not givendochas value- Throws:
IOException
-