public class StatsField extends Object
StatsParams.STATS_FIELD
instance.StatsComponent
Modifier and Type | Class and Description |
---|---|
static class |
StatsField.HllOptions
Helper Struct for parsing and encapsulating all of the options relaed to building a
HLL |
static class |
StatsField.Stat
An enumeration representing the sumer set of all possible stat values that can be computed.
|
Modifier and Type | Field and Description |
---|---|
static Set<StatsField.Stat> |
DEFAULT_STATS
The set of stats computed by default when no localparams are used to specify explicit stats
|
Constructor and Description |
---|
StatsField(ResponseBuilder rb,
String statsParam) |
Modifier and Type | Method and Description |
---|---|
boolean |
calculateStats(StatsField.Stat stat) |
DocSet |
computeBaseDocSet()
Computes a base
DocSet for the current request to be used
when computing global stats for the local index. |
StatsValues |
computeLocalStatsValues(DocSet base)
|
StatsField.HllOptions |
getHllOptions() |
boolean |
getIsShard() |
String |
getOutputKey()
The key to be used when refering to this
StatsField instance in the
response tp clients. |
List<Double> |
getPercentilesList() |
SchemaField |
getSchemaField()
The
SchemaField whose results these stats are computed over, may be null
if the stats are computed over the results of a function or query |
SolrIndexSearcher |
getSearcher()
The searcher that should be used for processing local stats
|
List<String> |
getTagList() |
double |
getTdigestCompression() |
ValueSource |
getValueSource()
The
ValueSource of a function or query whose results these stats are computed
over, may be null if the stats are directly over a SchemaField |
boolean |
includeInResponse(StatsField.Stat stat) |
String |
toString() |
public static final Set<StatsField.Stat> DEFAULT_STATS
public StatsField(ResponseBuilder rb, String statsParam)
rb
- the current request/responsestatsParam
- the raw StatsParams.STATS_FIELD
stringpublic String getOutputKey()
StatsField
instance in the
response tp clients.public DocSet computeBaseDocSet() throws IOException
DocSet
for the current request to be used
when computing global stats for the local index.
This is typically the same as the main DocSet for the ResponseBuilder
unless tag
ged filter queries have been excluded using
the ex
local paramIOException
public StatsValues computeLocalStatsValues(DocSet base) throws IOException
IOException
computeBaseDocSet()
public SolrIndexSearcher getSearcher()
SolrQueryRequest.getSearcher()
public SchemaField getSchemaField()
SchemaField
whose results these stats are computed over, may be null
if the stats are computed over the results of a function or querygetValueSource()
public ValueSource getValueSource()
ValueSource
of a function or query whose results these stats are computed
over, may be null if the stats are directly over a SchemaField
getValueSource()
public boolean calculateStats(StatsField.Stat stat)
public boolean includeInResponse(StatsField.Stat stat)
public boolean getIsShard()
public double getTdigestCompression()
public StatsField.HllOptions getHllOptions()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.