Package org.apache.solr.search.stats
Class ExactStatsCache
- java.lang.Object
-
- org.apache.solr.search.stats.StatsCache
-
- org.apache.solr.search.stats.ExactStatsCache
-
- All Implemented Interfaces:
PluginInfoInitialized
- Direct Known Subclasses:
ExactSharedStatsCache,LRUStatsCache
public class ExactStatsCache extends StatsCache
This class implements exact caching of statistics. It requires an additional round-trip to parse query at shard servers, and return term statistics for query terms (and collection statistics for term fields).Global statistics are cached in the current request's context and discarded once the processing of the current request is complete. There's no support for longer-term caching, and each request needs to build the global statistics from scratch, even for repeating queries.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classExactStatsCache.ExactStatsSource-
Nested classes/interfaces inherited from class org.apache.solr.search.stats.StatsCache
StatsCache.StatsCacheMetrics
-
-
Field Summary
-
Fields inherited from class org.apache.solr.search.stats.StatsCache
COL_STATS_KEY, FIELDS_KEY, pluginInfo, statsCacheMetrics, TERM_STATS_KEY, TERMS_KEY
-
-
Constructor Summary
Constructors Constructor Description ExactStatsCache()
-
Method Summary
-
Methods inherited from class org.apache.solr.search.stats.StatsCache
approxCheckMissingStats, clear, get, getCacheMetrics, init, mergeToGlobalStats, receiveGlobalStats, retrieveStatsRequest, returnLocalStats, sendGlobalStats
-
-
-
-
Method Detail
-
doGet
protected StatsSource doGet(SolrQueryRequest req)
- Specified by:
doGetin classStatsCache
-
doRetrieveStatsRequest
protected ShardRequest doRetrieveStatsRequest(ResponseBuilder rb)
- Specified by:
doRetrieveStatsRequestin classStatsCache
-
doMergeToGlobalStats
protected void doMergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses)
- Specified by:
doMergeToGlobalStatsin classStatsCache
-
addToPerShardColStats
protected void addToPerShardColStats(SolrQueryRequest req, String shard, Map<String,CollectionStats> colStats)
-
printStats
protected void printStats(SolrQueryRequest req)
-
addToPerShardTermStats
protected void addToPerShardTermStats(SolrQueryRequest req, String shard, String termStatsString)
-
doReturnLocalStats
protected void doReturnLocalStats(ResponseBuilder rb, SolrIndexSearcher searcher)
- Specified by:
doReturnLocalStatsin classStatsCache
-
doSendGlobalStats
protected void doSendGlobalStats(ResponseBuilder rb, ShardRequest outgoing)
- Specified by:
doSendGlobalStatsin classStatsCache
-
getPerShardColStats
protected Map<String,CollectionStats> getPerShardColStats(ResponseBuilder rb, String shard)
-
getPerShardTermStats
protected TermStats getPerShardTermStats(SolrQueryRequest req, String t, String shard)
-
doReceiveGlobalStats
protected void doReceiveGlobalStats(SolrQueryRequest req)
- Specified by:
doReceiveGlobalStatsin classStatsCache
-
addToGlobalColStats
protected void addToGlobalColStats(SolrQueryRequest req, Map.Entry<String,CollectionStats> e)
-
addToGlobalTermStats
protected void addToGlobalTermStats(SolrQueryRequest req, Map.Entry<String,TermStats> e)
-
-