Class StatsField

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


        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)
        rb - the current request/response
        statsParam - the raw StatsParams.STATS_FIELD string
    • Method Detail

      • 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

      • 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:
      • includeInResponse

        public boolean includeInResponse​(StatsField.Stat stat)
      • getPercentilesList

        public List<Double> getPercentilesList()
      • getIsShard

        public boolean getIsShard()
      • getTdigestCompression

        public double getTdigestCompression()