Class StatsField
- java.lang.Object
-
- org.apache.solr.handler.component.StatsField
-
public class StatsField extends Object
Models all of the information associated with a singleStatsParams.STATS_FIELD
instance.- See Also:
StatsComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StatsField.HllOptions
Helper Struct for parsing and encapsulating all of the options relaed to building aHLL
static class
StatsField.Stat
An enumeration representing the sumer set of all possible stat values that can be computed.
-
Field Summary
Fields Modifier and Type Field Description static Set<StatsField.Stat>
DEFAULT_STATS
The set of stats computed by default when no localparams are used to specify explicit stats
-
Constructor Summary
Constructors Constructor Description StatsField(ResponseBuilder rb, String statsParam)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
calculateStats(StatsField.Stat stat)
DocSet
computeBaseDocSet()
Computes a baseDocSet
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 thisStatsField
instance in the response tp clients.List<Double>
getPercentilesList()
SchemaField
getSchemaField()
TheSchemaField
whose results these stats are computed over, may be null if the stats are computed over the results of a function or querySolrIndexSearcher
getSearcher()
The searcher that should be used for processing local statsList<String>
getTagList()
double
getTdigestCompression()
org.apache.lucene.queries.function.ValueSource
getValueSource()
TheValueSource
of a function or query whose results these stats are computed over, may be null if the stats are directly over aSchemaField
boolean
includeInResponse(StatsField.Stat stat)
String
toString()
-
-
-
Field Detail
-
DEFAULT_STATS
public static final Set<StatsField.Stat> DEFAULT_STATS
The set of stats computed by default when no localparams are used to specify explicit stats
-
-
Constructor Detail
-
StatsField
public StatsField(ResponseBuilder rb, String statsParam)
- Parameters:
rb
- the current request/responsestatsParam
- the rawStatsParams.STATS_FIELD
string
-
-
Method Detail
-
getOutputKey
public String getOutputKey()
The key to be used when refering to thisStatsField
instance in the response tp clients.
-
computeBaseDocSet
public DocSet computeBaseDocSet() throws IOException
Computes a baseDocSet
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
unlesstag
ged filter queries have been excluded using theex
local param- Throws:
IOException
-
computeLocalStatsValues
public StatsValues computeLocalStatsValues(DocSet base) throws IOException
- Throws:
IOException
- See Also:
computeBaseDocSet()
-
getSearcher
public SolrIndexSearcher getSearcher()
The searcher that should be used for processing local stats- See Also:
SolrQueryRequest.getSearcher()
-
getSchemaField
public SchemaField getSchemaField()
TheSchemaField
whose results these stats are computed over, may be null if the stats are computed over the results of a function or query- See Also:
getValueSource()
-
getValueSource
public org.apache.lucene.queries.function.ValueSource getValueSource()
TheValueSource
of a function or query whose results these stats are computed over, may be null if the stats are directly over aSchemaField
- See Also:
getValueSource()
-
calculateStats
public boolean calculateStats(StatsField.Stat stat)
-
includeInResponse
public boolean includeInResponse(StatsField.Stat stat)
-
getIsShard
public boolean getIsShard()
-
getTdigestCompression
public double getTdigestCompression()
-
getHllOptions
public StatsField.HllOptions getHllOptions()
-
-