public class LocalStatsCache extends StatsCache
COL_STATS_KEY, TERM_STATS_KEY, TERMS_KEY
Constructor and Description |
---|
LocalStatsCache() |
Modifier and Type | Method and Description |
---|---|
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). |
void |
init(PluginInfo info) |
void |
mergeToGlobalStats(SolrQueryRequest req,
List<ShardResponse> responses)
Process shard responses that contain partial local stats.
|
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)
StatsCache
StatsSource
to provide stats information to perform
local scoring (to be precise, to build a local Weight
from the
query).get
in class StatsCache
req
- query requestStatsSource
to use in creating a query
Weight
public void init(PluginInfo info)
public ShardRequest retrieveStatsRequest(ResponseBuilder rb)
StatsCache
ShardRequest
to retrieve per-shard stats related to the
current query and the current state of the requester's StatsCache
.retrieveStatsRequest
in class StatsCache
rb
- contains current requestpublic void mergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses)
StatsCache
mergeToGlobalStats
in class StatsCache
req
- query requestresponses
- responses from shards containing local stats for each shardpublic void returnLocalStats(ResponseBuilder rb, SolrIndexSearcher searcher)
StatsCache
returnLocalStats
in class StatsCache
rb
- response buildersearcher
- current local searcherpublic void receiveGlobalStats(SolrQueryRequest req)
StatsCache
QueryCommand
to be submitted to
the local SolrIndexSearcher
.receiveGlobalStats
in class StatsCache
req
- query request with global stats datapublic void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing)
StatsCache
sendGlobalStats
in class StatsCache
rb
- response builderoutgoing
- shard request to be sentCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.