public interface StatsCollector
StatsCollector
implementations reduce a list of Objects to a single value.
Most implementations reduce a list to a statistic on that list.Modifier and Type | Method and Description |
---|---|
void |
collect(int doc)
Collect values from the value source and add to statistics.
|
void |
compute()
After all documents have been collected, this method should be
called to finalize the calculations of each statistic.
|
FunctionValues |
getFunction() |
Comparable |
getStat(String stat)
Return the value of the given statistic.
|
Set<String> |
getStatsList() |
MutableValue |
getValue() |
void |
setNextReader(LeafReaderContext context) |
String |
valueSourceString() |
void collect(int doc)
doc
- Document to collect fromvoid setNextReader(LeafReaderContext context) throws IOException
context
- The context to read documents from.IOException
- if setting next reader failsMutableValue getValue()
FunctionValues getFunction()
Set<String> getStatsList()
Comparable getStat(String stat)
stat
- the statvoid compute()
String valueSourceString()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.