mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
[DOCS] Move common scripting use cases up a level (#73445)
This commit is contained in:
parent
bbb25a01ce
commit
3d36df5cbd
3 changed files with 7 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -566,4 +566,3 @@ DELETE /_ingest/pipeline/my_test_scores_pipeline
|
|||
|
||||
////
|
||||
|
||||
include::common-script-uses.asciidoc[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue