public abstract class StatsCache extends Object implements PluginInfoInitialized
There are instances of this class at the aggregator node (where the partial data from shards is aggregated), and on each core involved in a shard request (where this data is maintained and updated from the central cache).
Modifier and Type | Field and Description |
---|---|
static String |
COL_STATS_KEY
Value of
CollectionStats . |
static String |
TERM_STATS_KEY
Map of terms and
TermStats . |
static String |
TERMS_KEY
List of terms in the query.
|
Constructor and Description |
---|
StatsCache() |
Modifier and Type | Method and Description |
---|---|
abstract 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). |
abstract void |
mergeToGlobalStats(SolrQueryRequest req,
List<ShardResponse> responses)
Process shard responses that contain partial local stats.
|
abstract void |
receiveGlobalStats(SolrQueryRequest req)
Receive global stats data from the master and update a local cache of stats
with this global data.
|
abstract 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 . |
abstract void |
returnLocalStats(ResponseBuilder rb,
SolrIndexSearcher searcher)
Prepare a local (from the local shard) response to a "retrieve stats" shard
request.
|
abstract void |
sendGlobalStats(ResponseBuilder rb,
ShardRequest outgoing)
Prepare global stats data to be sent out to shards in this request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
public static final String TERM_STATS_KEY
TermStats
.public static final String COL_STATS_KEY
CollectionStats
.public static final String TERMS_KEY
public abstract ShardRequest retrieveStatsRequest(ResponseBuilder rb)
ShardRequest
to retrieve per-shard stats related to the
current query and the current state of the requester's StatsCache
.rb
- contains current requestpublic abstract void returnLocalStats(ResponseBuilder rb, SolrIndexSearcher searcher)
rb
- response buildersearcher
- current local searcherpublic abstract void mergeToGlobalStats(SolrQueryRequest req, List<ShardResponse> responses)
req
- query requestresponses
- responses from shards containing local stats for each shardpublic abstract void receiveGlobalStats(SolrQueryRequest req)
QueryCommand
to be submitted to
the local SolrIndexSearcher
.req
- query request with global stats datapublic abstract void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing)
rb
- response builderoutgoing
- shard request to be sentpublic abstract StatsSource get(SolrQueryRequest req)
StatsSource
to provide stats information to perform
local scoring (to be precise, to build a local Weight
from the
query).req
- query requestStatsSource
to use in creating a query
Weight
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.