public class PercentileStatsCollector extends AbstractDelegatingStatsCollector
PercentileStatsCollector computes a given list of percentiles.| Modifier and Type | Field and Description |
|---|---|
static Pattern |
PERCENTILE_PATTERN |
protected String[] |
percentileNames |
protected double[] |
percentiles |
protected Comparable[] |
results |
List<Comparable> |
values |
delegate, statsList| Constructor and Description |
|---|
PercentileStatsCollector(StatsCollector delegate,
double[] percentiles,
String[] percentileNames) |
| 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.
|
protected List<Comparable> |
getPercentiles() |
Comparable |
getStat(String stat)
Return the value of the given statistic.
|
delegate, getFunction, getStatsList, getValue, setNextReader, valueSourceStringpublic final List<Comparable> values
public static final Pattern PERCENTILE_PATTERN
protected final double[] percentiles
protected final String[] percentileNames
protected Comparable[] results
public PercentileStatsCollector(StatsCollector delegate, double[] percentiles, String[] percentileNames)
public Comparable getStat(String stat)
StatsCollectorstat - the statpublic void compute()
StatsCollectorprotected List<Comparable> getPercentiles()
public void collect(int doc)
StatsCollectorcollect in interface StatsCollectorcollect in class AbstractDelegatingStatsCollectordoc - Document to collect fromCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.