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 boolean
advanceExact(int doc)
Wrapper toorg.apache.lucene.index.DocValuesIterator#advanceExact(int)
returns whether or not givendoc
has valuevoid
collect(int doc, int slot, IntFunction<SlotAcc.SlotContext> slotContext)
All subclasses must override this method to collect documents.protected abstract void
collectValues(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 IOException
Description copied from class:SlotAcc
All 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:
collect
in classSlotAcc
- Parameters:
doc
- Single Segment docId (relative to the currentLeafReaderContext
to 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 -- theIntFunction
is only garunteed to be valid for the current slot, and theSlotAcc.SlotContext
returned 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 IOException
Wrapper toorg.apache.lucene.index.DocValuesIterator#advanceExact(int)
returns whether or not givendoc
has value- Throws:
IOException
-
-