public class BasicAccumulator extends ValueAccumulator
BasicAccumulator
manages the ValueCounters and Expressions without regard to Facets.Modifier and Type | Field and Description |
---|---|
protected org.apache.lucene.index.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
StatsCollector s to be collected. |
void |
compute()
Finalizes the statistics within each StatsCollector.
|
static BasicAccumulator |
create(SolrIndexSearcher searcher,
DocSet docs,
AnalyticsRequest request) |
protected void |
doSetNextReader(org.apache.lucene.index.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() |
postProcess
protected 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 org.apache.lucene.index.LeafReaderContext context
public BasicAccumulator(SolrIndexSearcher searcher, DocSet docs, AnalyticsRequest request) throws IOException
IOException
protected void doSetNextReader(org.apache.lucene.index.LeafReaderContext context) throws IOException
doSetNextReader
in class org.apache.lucene.search.SimpleCollector
IOException
public static BasicAccumulator create(SolrIndexSearcher searcher, DocSet docs, AnalyticsRequest request) throws IOException
IOException
public void collect(int doc) throws IOException
StatsCollector
s to be collected.collect
in interface org.apache.lucene.search.LeafCollector
collect
in class org.apache.lucene.search.SimpleCollector
doc
- Document to collect fromIOException
public void compute()
ValueAccumulator
export()
.compute
in class ValueAccumulator
public NamedList<?> export()
export
in class ValueAccumulator
public 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–2015 The Apache Software Foundation. All rights reserved.