Skip to main content

opensearch_client/ml/
nested.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 crate::ml;
12use serde::{Deserialize, Serialize};
13
14/// Nested
15/// The nested filter.
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct Nested {
19    /// The score mode.
20    #[serde(
21        rename = "score_mode",
22        default,
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub score_mode: Option<String>,
26    /// Whether to ignore unmapped fields.
27    #[serde(
28        rename = "ignore_unmapped",
29        default,
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub ignore_unmapped: Option<bool>,
33    /// Adjust the relevance score of a match.
34    #[serde(rename = "boost", default, skip_serializing_if = "Option::is_none")]
35    pub boost: Option<f64>,
36    /// The path to a field or an array of paths. Some APIs support wildcards in the path, which allows you to select multiple fields.
37    #[serde(rename = "path", default, skip_serializing_if = "Option::is_none")]
38    pub path: Option<String>,
39    /// The query.
40    #[serde(rename = "query", default, skip_serializing_if = "Option::is_none")]
41    pub query: Option<ml::Query>,
42}
43
44impl Nested {
45    /// The nested filter.
46    pub fn new() -> Nested {
47        Nested {
48            score_mode: None,
49            ignore_unmapped: None,
50            boost: None,
51            path: None,
52            query: None,
53        }
54    }
55}