Skip to content

[DOCS] [7.13] Move common scripting use cases up a level (#73445) #73466

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

Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions docs/reference/scripting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ include::scripting/painless.asciidoc[]

include::scripting/using.asciidoc[]

include::scripting/common-script-uses.asciidoc[]

include::scripting/fields.asciidoc[]

include::scripting/security.asciidoc[]
Expand Down
8 changes: 5 additions & 3 deletions docs/reference/scripting/common-script-uses.asciidoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[[common-script-uses]]
=== Common scripting use cases
== Common scripting use cases
You can write a script to do almost anything, and sometimes, that's
the trouble. It's challenging to know what's possible with scripts,
so the following examples address common uses cases where scripts are
really helpful.

* <<scripting-field-extraction,Field extraction>>

[[scripting-field-extraction]]
==== Field extraction
=== Field extraction
The goal of field extraction is simple; you have fields in your data with a bunch of
information, but you only want to extract pieces and parts.

Expand Down Expand Up @@ -73,7 +75,7 @@ POST /my-index/_bulk?refresh

[discrete]
[[field-extraction-ip]]
===== Extract an IP address from a log message (Grok)
==== Extract an IP address from a log message (Grok)
If you want to retrieve results that include `clientip`, you can add that
field as a runtime field in the mapping. The following runtime script defines a
grok pattern that extracts structured fields out of the `message` field.
Expand Down
1 change: 0 additions & 1 deletion docs/reference/scripting/using.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -566,4 +566,3 @@ DELETE /_ingest/pipeline/my_test_scores_pipeline

////

include::common-script-uses.asciidoc[]