Class StatsField

java.lang.Object
org.apache.solr.handler.component.StatsField

public class StatsField extends Object
Models all of the information associated with a single StatsParams.STATS_FIELD instance.
See Also:
  • Field Details

    • 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 Details

    • StatsField

      public StatsField(ResponseBuilder rb, String statsParam)
      Parameters:
      rb - the current request/response
      statsParam - the raw StatsParams.STATS_FIELD string
  • Method Details

    • getOutputKey

      public String getOutputKey()
      The key to be used when refering to this StatsField instance in the response tp clients.
    • computeBaseDocSet

      public DocSet computeBaseDocSet() throws IOException
      Computes a base 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 tagged filter queries have been excluded using the ex local param

      Throws:
      IOException
    • computeLocalStatsValues

      public StatsValues computeLocalStatsValues(DocSet base) throws IOException
      Computes the StatsValues for this StatsField relative to the specified DocSet
      Throws:
      IOException
      See Also:
    • getSearcher

      public SolrIndexSearcher getSearcher()
      The searcher that should be used for processing local stats
      See Also:
    • getSchemaField

      public 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
      See Also:
    • getValueSource

      public org.apache.lucene.queries.function.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
      See Also:
    • getTagList

      public List<String> getTagList()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • calculateStats

      public boolean calculateStats(StatsField.Stat stat)
    • includeInResponse

      public boolean includeInResponse(StatsField.Stat stat)
    • getPercentilesList

      public List<Double> getPercentilesList()
    • getIsShard

      public boolean getIsShard()
    • getTdigestCompression

      public double getTdigestCompression()
    • getHllOptions

      public StatsField.HllOptions getHllOptions()