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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct VariableWidthHistogramAggregation {
15    /// Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run.
16    /// Defaults to `min(10 * shard_size, 50000)`.
17    #[serde(
18        rename = "initial_buffer",
19        default,
20        skip_serializing_if = "Option::is_none"
21    )]
22    pub initial_buffer: Option<u32>,
23    /// The number of buckets that the coordinating node will request from each shard.
24    /// Defaults to `buckets * 50`.
25    #[serde(
26        rename = "shard_size",
27        default,
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub shard_size: Option<u32>,
31    /// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
32    #[serde(rename = "field", default, skip_serializing_if = "Option::is_none")]
33    pub field: Option<String>,
34    /// The target number of buckets.
35    #[serde(rename = "buckets", default, skip_serializing_if = "Option::is_none")]
36    pub buckets: Option<u32>,
37}
38
39impl VariableWidthHistogramAggregation {
40    pub fn new() -> VariableWidthHistogramAggregation {
41        VariableWidthHistogramAggregation {
42            initial_buffer: None,
43            shard_size: None,
44            field: None,
45            buckets: None,
46        }
47    }
48}