public class BasicAccumulator extends ValueAccumulator
BasicAccumulator manages the ValueCounters and Expressions without regard to Facets.| Modifier and Type | Field and Description |
|---|---|
protected LeafReaderContext |
context |
protected DocSet |
docs |
protected String[] |
expressionNames |
protected Expression[] |
expressions |
protected String[] |
expressionStrings |
protected Set<String> |
hiddenExpressions |
protected AnalyticsRequest |
request |
protected SolrIndexSearcher |
searcher |
protected com.google.common.base.Supplier<StatsCollector[]> |
statsCollectorArraySupplier |
protected StatsCollector[] |
statsCollectors |
| Constructor and Description |
|---|
BasicAccumulator(SolrIndexSearcher searcher,
DocSet docs,
AnalyticsRequest request) |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(int doc)
Passes the documents on to the
StatsCollectors to be collected. |
void |
compute()
Finalizes the statistics within each StatsCollector.
|
static BasicAccumulator |
create(SolrIndexSearcher searcher,
DocSet docs,
AnalyticsRequest request) |
protected void |
doSetNextReader(LeafReaderContext context) |
NamedList<?> |
export() |
long |
getNumQueries()
Used for JMX stats collecting.
|
long |
getNumStatsCollectors()
Used for JMX stats collecting.
|
String |
getResult(String expressionName)
Returns the value of an expression to use in a field or query facet.
|
Expression[] |
makeExpressions(StatsCollector[] statsCollectors)
Builds an array of Expressions with the given list of counters
|
boolean |
needsScores() |
postProcessgetLeafCollector, setScorerprotected final SolrIndexSearcher searcher
protected final AnalyticsRequest request
protected final DocSet docs
protected final com.google.common.base.Supplier<StatsCollector[]> statsCollectorArraySupplier
protected final StatsCollector[] statsCollectors
protected final Expression[] expressions
protected final String[] expressionNames
protected final String[] expressionStrings
protected LeafReaderContext context
public BasicAccumulator(SolrIndexSearcher searcher, DocSet docs, AnalyticsRequest request) throws IOException
IOExceptionprotected void doSetNextReader(LeafReaderContext context) throws IOException
doSetNextReader in class SimpleCollectorIOExceptionpublic static BasicAccumulator create(SolrIndexSearcher searcher, DocSet docs, AnalyticsRequest request) throws IOException
IOExceptionpublic void collect(int doc)
throws IOException
StatsCollectors to be collected.collect in interface LeafCollectorcollect in class SimpleCollectordoc - Document to collect fromIOExceptionpublic void compute()
ValueAccumulatorexport().compute in class ValueAccumulatorpublic NamedList<?> export()
export in class ValueAccumulatorpublic Expression[] makeExpressions(StatsCollector[] statsCollectors)
statsCollectors - the stats collectorspublic String getResult(String expressionName)
expressionName - the name of the expressionpublic long getNumStatsCollectors()
public long getNumQueries()
public boolean needsScores()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.