fix count type

This commit is contained in:
Pascal Seitz
2023-01-13 20:10:23 +08:00
parent 78273bfb0d
commit e07f1970ea
2 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ impl AverageAggregation {
#[derive(Default, Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Default, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct IntermediateAverage { pub struct IntermediateAverage {
pub(crate) sum: f64, pub(crate) sum: f64,
pub(crate) doc_count: u32, pub(crate) doc_count: u64,
} }
impl IntermediateAverage { impl IntermediateAverage {

View File

@@ -40,7 +40,7 @@ impl StatsAggregation {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Stats { pub struct Stats {
/// The number of documents. /// The number of documents.
pub count: u32, pub count: u64,
/// The sum of the fast field values. /// The sum of the fast field values.
pub sum: f64, pub sum: f64,
/// The standard deviation of the fast field values. `None` for count == 0. /// The standard deviation of the fast field values. `None` for count == 0.
@@ -74,7 +74,7 @@ impl Stats {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct IntermediateStats { pub struct IntermediateStats {
/// the number of values /// the number of values
pub count: u32, pub count: u64,
/// the sum of the values /// the sum of the values
pub sum: f64, pub sum: f64,
/// the squared sum of the values /// the squared sum of the values