From 11181898bfe98a71683a006c124d6245355ebc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Thu, 15 Sep 2022 17:37:05 +0200 Subject: [PATCH 1/6] [DOCS] Adds missing_bucket setting to transform APIs. --- docs/reference/rest-api/common-parms.asciidoc | 5 +++++ docs/reference/transform/apis/preview-transform.asciidoc | 8 ++++++++ docs/reference/transform/apis/put-transform.asciidoc | 9 ++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/reference/rest-api/common-parms.asciidoc b/docs/reference/rest-api/common-parms.asciidoc index bf36439167c11..0a7978720b2a5 100644 --- a/docs/reference/rest-api/common-parms.asciidoc +++ b/docs/reference/rest-api/common-parms.asciidoc @@ -627,6 +627,11 @@ applied regardless of other match predicates defined in the template. And if a f already defined in the mapping, then this parameter won't be used. end::bulk-dynamic-templates[] +tag::missing-bucket[] +If `true`, documents without a value in the given `group_by` field are included. +Defaults to `false`. +end::missing-bucket[] + tag::node-filter[] ``:: (Optional, string) diff --git a/docs/reference/transform/apis/preview-transform.asciidoc b/docs/reference/transform/apis/preview-transform.asciidoc index d0a698963f714..5e2f186d0f2b6 100644 --- a/docs/reference/transform/apis/preview-transform.asciidoc +++ b/docs/reference/transform/apis/preview-transform.asciidoc @@ -145,6 +145,14 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-aggs] `group_by`::: (Required, object) include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-group-by] ++ +.Properties of `group_by` +[%collapsible%open] +===== +`missing_bucket`:::: +(Optional, boolean) +include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=missing-bucket] +===== ==== //End pivot diff --git a/docs/reference/transform/apis/put-transform.asciidoc b/docs/reference/transform/apis/put-transform.asciidoc index 0096ad0681e56..03ff4836644e0 100644 --- a/docs/reference/transform/apis/put-transform.asciidoc +++ b/docs/reference/transform/apis/put-transform.asciidoc @@ -163,7 +163,14 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-aggs] `group_by`::: (Required, object) include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-group-by] - ++ +.Properties of `group_by` +[%collapsible%open] +===== +`missing_bucket`:::: +(Optional, boolean) +include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=missing-bucket] +===== ==== //End pivot From 576e8f4e7d0a8398b2a399332065e1c23a67b2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Thu, 15 Sep 2022 17:53:26 +0200 Subject: [PATCH 2/6] [DOCS] Amends example API call. --- docs/reference/transform/apis/put-transform.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/transform/apis/put-transform.asciidoc b/docs/reference/transform/apis/put-transform.asciidoc index 03ff4836644e0..231fb1f821659 100644 --- a/docs/reference/transform/apis/put-transform.asciidoc +++ b/docs/reference/transform/apis/put-transform.asciidoc @@ -316,7 +316,8 @@ PUT _transform/ecommerce_transform1 "group_by": { "customer_id": { "terms": { - "field": "customer_id" + "field": "customer_id", + "missing_bucket": true } } }, From b0e2689523e89e6d2d5d415b9221895d94c17007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Thu, 15 Sep 2022 17:56:56 +0200 Subject: [PATCH 3/6] [DOCS] Minor edits. --- docs/reference/rest-api/common-parms.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/rest-api/common-parms.asciidoc b/docs/reference/rest-api/common-parms.asciidoc index 0a7978720b2a5..0be4bd84b532f 100644 --- a/docs/reference/rest-api/common-parms.asciidoc +++ b/docs/reference/rest-api/common-parms.asciidoc @@ -628,8 +628,8 @@ already defined in the mapping, then this parameter won't be used. end::bulk-dynamic-templates[] tag::missing-bucket[] -If `true`, documents without a value in the given `group_by` field are included. -Defaults to `false`. +If `true`, documents without a value in the respective `group_by` field are +included. Defaults to `false`. end::missing-bucket[] tag::node-filter[] From 38c5bf56379eb9fcf928f1af8f989c443c4e6d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 19 Sep 2022 14:34:39 +0200 Subject: [PATCH 4/6] [DOCS] Moves missing_bucket description to group_by description. --- docs/reference/rest-api/common-parms.asciidoc | 8 +++----- docs/reference/transform/apis/put-transform.asciidoc | 8 -------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/reference/rest-api/common-parms.asciidoc b/docs/reference/rest-api/common-parms.asciidoc index 0be4bd84b532f..33f038dfa76e2 100644 --- a/docs/reference/rest-api/common-parms.asciidoc +++ b/docs/reference/rest-api/common-parms.asciidoc @@ -627,11 +627,6 @@ applied regardless of other match predicates defined in the template. And if a f already defined in the mapping, then this parameter won't be used. end::bulk-dynamic-templates[] -tag::missing-bucket[] -If `true`, documents without a value in the respective `group_by` field are -included. Defaults to `false`. -end::missing-bucket[] - tag::node-filter[] ``:: (Optional, string) @@ -734,6 +729,9 @@ The following groupings are currently supported: * <<_histogram,Histogram>> * <<_terms,Terms>> +The grouping properties can optionally have a `missing_bucket` property. If +it's `true`, documents without a value in the respective `group_by` field are +included. Defaults to `false`. -- end::pivot-group-by[] diff --git a/docs/reference/transform/apis/put-transform.asciidoc b/docs/reference/transform/apis/put-transform.asciidoc index 231fb1f821659..c044373ccc775 100644 --- a/docs/reference/transform/apis/put-transform.asciidoc +++ b/docs/reference/transform/apis/put-transform.asciidoc @@ -163,14 +163,6 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-aggs] `group_by`::: (Required, object) include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-group-by] -+ -.Properties of `group_by` -[%collapsible%open] -===== -`missing_bucket`:::: -(Optional, boolean) -include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=missing-bucket] -===== ==== //End pivot From 1270bee27d921253c912f11a2fdf5dbe90af9235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 19 Sep 2022 14:36:58 +0200 Subject: [PATCH 5/6] [DOCS] Removes property from preview transforms. --- docs/reference/transform/apis/preview-transform.asciidoc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/reference/transform/apis/preview-transform.asciidoc b/docs/reference/transform/apis/preview-transform.asciidoc index 5e2f186d0f2b6..d0a698963f714 100644 --- a/docs/reference/transform/apis/preview-transform.asciidoc +++ b/docs/reference/transform/apis/preview-transform.asciidoc @@ -145,14 +145,6 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-aggs] `group_by`::: (Required, object) include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=pivot-group-by] -+ -.Properties of `group_by` -[%collapsible%open] -===== -`missing_bucket`:::: -(Optional, boolean) -include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=missing-bucket] -===== ==== //End pivot From 888722f056bd8da159d1253595138d11b2af63dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 19 Sep 2022 14:50:26 +0200 Subject: [PATCH 6/6] [DOCS] Expands example in preview transform. --- docs/reference/transform/apis/preview-transform.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/transform/apis/preview-transform.asciidoc b/docs/reference/transform/apis/preview-transform.asciidoc index d0a698963f714..86ca91b32fdf1 100644 --- a/docs/reference/transform/apis/preview-transform.asciidoc +++ b/docs/reference/transform/apis/preview-transform.asciidoc @@ -297,7 +297,8 @@ POST _transform/_preview "group_by": { "customer_id": { "terms": { - "field": "customer_id" + "field": "customer_id", + "missing_bucket": true } } },