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

This commit is contained in:
Adam Locke 2021-05-27 07:38:55 -04:00 committed by GitHub
parent bbb25a01ce
commit 3d36df5cbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -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[]

View file

@ -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.
@ -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.

View file

@ -566,4 +566,3 @@ DELETE /_ingest/pipeline/my_test_scores_pipeline
////
include::common-script-uses.asciidoc[]