The stats component calculates some mathematical statistics of fields in the index. The main requirement is that the field be indexed. The following statistics are computed over the non-null values (except missing
which counts the nulls):
min
: The smallest valuemax
: The largest valuesum
: The sumcount
: The quantity of non-null values accumulated in these statisticsmissing
: The quantity of records skipped due to missing valuessumOfSquares
: The sum of the square of each value; this is probably the least useful and is used internally to computestddev
efficientlymean
: The average valuestddev
: The standard deviation of the valuesdistinctValues
: A list of all distinct (non-duplicating) valuescountDistinct
: The size of distinctValues
If you calculate stats on a string or date field, then only min
, max
, count
, missing
, distinctValues
, and countDistinct
are calculated. The distinctValues
and countDistinct
are only present if stats.calcdistinct
is enabled.