Skip to content

Commit

Permalink
[DOCS] Adds an admonition to the transform painless examples. (#113706)…
Browse files Browse the repository at this point in the history
… (#113762)
  • Loading branch information
szabosteve committed Sep 30, 2024
1 parent abb48bd commit 568a637
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/reference/transform/painless-examples.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<titleabbrev>Painless examples</titleabbrev>
++++


IMPORTANT: The examples that use the `scripted_metric` aggregation are not supported on {es} Serverless.

These examples demonstrate how to use Painless in {transforms}. You can learn
more about the Painless scripting language in the
{painless}/painless-guide.html[Painless guide].
Expand Down Expand Up @@ -37,6 +40,8 @@ with the latest timestamp. From a technical perspective, it helps to achieve
the function of a <<search-aggregations-metrics-top-hits-aggregation>> by using
scripted metric aggregation in a {transform}, which provides a metric output.

IMPORTANT: This example uses a `scripted_metric` aggregation which is not supported on {es} Serverless.

[source,js]
--------------------------------------------------
"aggregations": {
Expand Down Expand Up @@ -453,6 +458,8 @@ example for details.
The example below assumes that the HTTP response codes are stored as keywords in
the `response` field of the documents.

IMPORTANT: This example uses a `scripted_metric` aggregation which is not supported on {es} Serverless.

[source,js]
--------------------------------------------------
"aggregations": { <1>
Expand Down Expand Up @@ -507,7 +514,9 @@ Finally, returns the `counts` array with the response counts.
== Comparing indices by using scripted metric aggregations

This example shows how to compare the content of two indices by a {transform}
that uses a scripted metric aggregation.
that uses a scripted metric aggregation.

IMPORTANT: This example uses a `scripted_metric` aggregation which is not supported on {es} Serverless.

[source,console]
--------------------------------------------------
Expand Down Expand Up @@ -623,6 +632,8 @@ By using the `sessionid` as a group-by field, you are able to enumerate events
through the session and get more details of the session by using scripted metric
aggregation.

IMPORTANT: This example uses a `scripted_metric` aggregation which is not supported on {es} Serverless.

[source,js]
--------------------------------------------------
POST _transform/_preview
Expand Down

0 comments on commit 568a637

Please sign in to comment.