Skip to main content

opensearch_client/common/aggregations/
variable_width_histogram_aggregation.rs

1/*
2 * opensearch-client
3 *
4 * Rust Client for OpenSearch
5 *
6 * The version of the OpenAPI document: 3.1.0
7 * Contact: alberto.paro@gmail.com
8 * Generated by Paro OpenAPI Generator
9 */
10
11use serde::{Deserialize, Serialize};
12
13
14
15
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct VariableWidthHistogramAggregation {  /// Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run.
18  /// Defaults to `min(10 * shard_size, 50000)`.
19    #[serde(rename = "initial_buffer", default, skip_serializing_if = "Option::is_none")]
20    pub initial_buffer: Option<u32>,  /// The number of buckets that the coordinating node will request from each shard.
21  /// Defaults to `buckets * 50`.
22    #[serde(rename = "shard_size", default, skip_serializing_if = "Option::is_none")]
23    pub shard_size: Option<u32>,  /// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
24    #[serde(rename = "field", default, skip_serializing_if = "Option::is_none")]
25    pub field: Option<String>,  /// The target number of buckets.
26    #[serde(rename = "buckets", default, skip_serializing_if = "Option::is_none")]
27    pub buckets: Option<u32>,
28}
29
30impl VariableWidthHistogramAggregation {
31    
32    pub fn new() -> VariableWidthHistogramAggregation {
33        VariableWidthHistogramAggregation {
34            initial_buffer: None,
35            shard_size: None,
36            field: None,
37            buckets: None,
38        }
39    }
40}