logo
pub struct FieldStats {
    pub count: Option<i64>,
    pub max: Option<String>,
    pub mean: Option<String>,
    pub min: Option<String>,
    pub missing: Option<i64>,
    pub stddev: Option<f64>,
    pub sum: Option<f64>,
    pub sum_of_squares: Option<f64>,
}
Expand description

The statistics for a field calculated in the request.

Fields

count: Option<i64>

The number of documents that contain a value in the specified field in the result set.

max: Option<String>

The maximum value found in the specified field in the result set.

If the field is numeric (int, int-array, double, or double-array), max is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, max is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

mean: Option<String>

The average of the values found in the specified field in the result set.

If the field is numeric (int, int-array, double, or double-array), mean is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, mean is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

min: Option<String>

The minimum value found in the specified field in the result set.

If the field is numeric (int, int-array, double, or double-array), min is the string representation of a double-precision 64-bit floating point value. If the field is date or date-array, min is the string representation of a date with the format specified in IETF RFC3339: yyyy-mm-ddTHH:mm:ss.SSSZ.

missing: Option<i64>

The number of documents that do not contain a value in the specified field in the result set.

stddev: Option<f64>

The standard deviation of the values in the specified field in the result set.

sum: Option<f64>

The sum of the field values across the documents in the result set. null for date fields.

sum_of_squares: Option<f64>

The sum of all field values in the result set squared.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more