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