aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse.rs26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/parse.rs b/src/parse.rs
index 07c55a0..10216f7 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -141,6 +141,8 @@ pub struct SearchBody {
pub terminate_after: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<String>, // string is "time units"
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub track_total_hits: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug)]
@@ -654,8 +656,12 @@ pub struct ApiAggregation {
#[serde(skip_serializing_if = "Option::is_none")]
filters: Option<FiltersAggregation>,
#[serde(skip_serializing_if = "Option::is_none")]
+ composite: Option<CompositeAggregation>,
+ #[serde(skip_serializing_if = "Option::is_none")]
histogram: Option<SimpleAggregation>,
#[serde(skip_serializing_if = "Option::is_none")]
+ date_histogram: Option<DateHistogramAggregation>,
+ #[serde(skip_serializing_if = "Option::is_none")]
terms: Option<TermsAggregation>,
#[serde(skip_serializing_if = "Option::is_none")]
significant_terms: Option<SimpleAggregation>,
@@ -698,6 +704,8 @@ pub struct SimpleAggregation {
#[serde(skip_serializing_if = "Option::is_none")]
missing: Option<StringOrNum>,
#[serde(skip_serializing_if = "Option::is_none")]
+ missing_bucket: Option<bool>,
+ #[serde(skip_serializing_if = "Option::is_none")]
keyed: Option<bool>,
}
@@ -716,11 +724,23 @@ pub struct DateHistogramAggregation {
#[serde(skip_serializing_if = "Option::is_none")]
offset: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
- order: Option<HashMap<String, String>>,
+ order: Option<SortElement>,
#[serde(skip_serializing_if = "Option::is_none")]
keyed: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
missing: Option<StringOrNum>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ missing_bucket: Option<bool>,
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+#[serde(deny_unknown_fields)]
+pub struct CompositeAggregation {
+ sources: Vec<HashMap<String,ApiAggregation>>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ size: Option<u32>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ after: Option<HashMap<String, StringOrNum>>,
}
#[derive(Serialize, Deserialize, Debug)]
@@ -744,7 +764,7 @@ pub struct TermsAggregation {
#[serde(skip_serializing_if = "Option::is_none")]
show_term_doc_count_error: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
- order: Option<HashMap<String, String>>,
+ order: Option<SortElement>,
#[serde(skip_serializing_if = "Option::is_none")]
include: Option<StringOrArray>,
#[serde(skip_serializing_if = "Option::is_none")]
@@ -753,4 +773,6 @@ pub struct TermsAggregation {
execution_hint: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
missing: Option<StringOrNum>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ missing_bucket: Option<bool>,
}