public class ExactStatsCache extends StatsCache
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ExactStatsCache.ExactStatsSource |
COL_STATS_KEY, TERM_STATS_KEY, TERMS_KEY| Constructor and Description |
|---|
ExactStatsCache() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToGlobalColStats(SolrQueryRequest req,
Map.Entry<String,CollectionStats> e) |
protected void |
addToGlobalTermStats(SolrQueryRequest req,
Map.Entry<String,TermStats> e) |
protected void |
addToPerShardColStats(SolrQueryRequest req,
String shard,
Map<String,CollectionStats> colStats) |
protected void |
addToPerShardTermStats(SolrQueryRequest req,
String shard,
String termStatsString) |
StatsSource |
get(SolrQueryRequest req)
Prepare local
StatsSource to provide stats information to perform
local scoring (to be precise, to build a local Weight from the
query). |
protected Map<String,CollectionStats> |
getPerShardColStats(ResponseBuilder rb,
String shard) |
protected TermStats |
getPerShardTermStats(SolrQueryRequest req,
String t,
String shard) |
void |
init(PluginInfo info) |
void |
mergeToGlobalStats(SolrQueryRequest req,
List<ShardResponse> responses)
Process shard responses that contain partial local stats.
|
protected void |
printStats(SolrQueryRequest req) |
void |
receiveGlobalStats(SolrQueryRequest req)
Receive global stats data from the master and update a local cache of stats
with this global data.
|
ShardRequest |
retrieveStatsRequest(ResponseBuilder rb)
Creates a
ShardRequest to retrieve per-shard stats related to the
current query and the current state of the requester's StatsCache. |
void |
returnLocalStats(ResponseBuilder rb,
SolrIndexSearcher searcher)
Prepare a local (from the local shard) response to a "retrieve stats" shard
request.
|
void |
sendGlobalStats(ResponseBuilder rb,
ShardRequest outgoing)
Prepare global stats data to be sent out to shards in this request.
|
public StatsSource get(SolrQueryRequest req)
StatsCacheStatsSource to provide stats information to perform
local scoring (to be precise, to build a local Weight from the
query).get in class StatsCachereq - query requestStatsSource to use in creating a query
Weightpublic void init(PluginInfo info)
public ShardRequest retrieveStatsRequest(ResponseBuilder rb)
StatsCacheShardRequest to retrieve per-shard stats related to the
current query and the current state of the requester's StatsCache.retrieveStatsRequest in class StatsCacherb - contains current requestpublic void mergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses)
StatsCachemergeToGlobalStats in class StatsCachereq - query requestresponses - responses from shards containing local stats for each shardprotected void addToPerShardColStats(SolrQueryRequest req, String shard, Map<String,CollectionStats> colStats)
protected void printStats(SolrQueryRequest req)
protected void addToPerShardTermStats(SolrQueryRequest req, String shard, String termStatsString)
public void returnLocalStats(ResponseBuilder rb, SolrIndexSearcher searcher)
StatsCachereturnLocalStats in class StatsCacherb - response buildersearcher - current local searcherpublic void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing)
StatsCachesendGlobalStats in class StatsCacherb - response builderoutgoing - shard request to be sentprotected Map<String,CollectionStats> getPerShardColStats(ResponseBuilder rb, String shard)
protected TermStats getPerShardTermStats(SolrQueryRequest req, String t, String shard)
public void receiveGlobalStats(SolrQueryRequest req)
StatsCacheQueryCommand to be submitted to
the local SolrIndexSearcher.receiveGlobalStats in class StatsCachereq - query request with global stats dataprotected void addToGlobalColStats(SolrQueryRequest req, Map.Entry<String,CollectionStats> e)
protected void addToGlobalTermStats(SolrQueryRequest req, Map.Entry<String,TermStats> e)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.