From aeb955e07e770c4f6df5598fabe4541ecfea894d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Thu, 29 Oct 2020 17:35:38 +0100 Subject: [PATCH] [DOCS] Adds note box about mappings to Transforms Painless examples (#64285) (#64363) --- docs/reference/transform/painless-examples.asciidoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/reference/transform/painless-examples.asciidoc b/docs/reference/transform/painless-examples.asciidoc index a42337cd9f5..bc51e89a511 100644 --- a/docs/reference/transform/painless-examples.asciidoc +++ b/docs/reference/transform/painless-examples.asciidoc @@ -18,9 +18,17 @@ more about the Painless scripting language in the * <> * <> -NOTE: While the context of the following examples is the {transform} use case, +[NOTE] +-- +* While the context of the following examples is the {transform} use case, the Painless scripts in the snippets below can be used in other {es} search aggregations, too. +* All the following examples use scripts, {transforms} cannot deduce mappings of +output fields when the fields are created by a script. {transforms-cap} don't +create any mappings in the the destination index for these fields, which means +they get dynamically mapped. Create the destination index prior to starting the +{transform} in case you want explicit mappings. +-- [[painless-top-hits]] == Getting top hits by using scripted metric aggregation