1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* opensearch-client
*
* Rust Client for OpenSearch
*
* The version of the OpenAPI document: 3.1.0
* Contact: alberto.paro@gmail.com
* Generated by Paro OpenAPI Generator
*/
use crate::ml;
use serde::{Deserialize, Serialize};
/// Nested
/// The nested filter.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Nested {
/// The score mode.
#[serde(
rename = "score_mode",
default,
skip_serializing_if = "Option::is_none"
)]
pub score_mode: Option<String>,
/// Whether to ignore unmapped fields.
#[serde(
rename = "ignore_unmapped",
default,
skip_serializing_if = "Option::is_none"
)]
pub ignore_unmapped: Option<bool>,
/// Adjust the relevance score of a match.
#[serde(rename = "boost", default, skip_serializing_if = "Option::is_none")]
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.
#[serde(rename = "path", default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// The query.
#[serde(rename = "query", default, skip_serializing_if = "Option::is_none")]
pub query: Option<ml::Query>,
}
impl Nested {
/// The nested filter.
pub fn new() -> Nested {
Nested {
score_mode: None,
ignore_unmapped: None,
boost: None,
path: None,
query: None,
}
}
}