Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Adds an admonition to the transform painless examples about scripted_metric aggregation #113706

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading