mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
[Docs] Fix runtime grok script example (#87851)
* [Docs] Fix runtime grok script example * Update runtime.asciidoc Small fix. * Update runtime.asciidoc Small fix... * Update common-script-uses.asciidoc Small fix. * Update docs/reference/scripting/common-script-uses.asciidoc Co-authored-by: Adam Locke <adam.locke@elastic.co> Co-authored-by: Adam Locke <adam.locke@elastic.co>
This commit is contained in:
parent
9ee6a19187
commit
992344a3fc
2 changed files with 7 additions and 7 deletions
|
@ -76,9 +76,9 @@ 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.
|
||||
|
||||
The script matches on the `%{COMMONAPACHELOG}` log pattern, which understands
|
||||
the structure of Apache logs. If the pattern matches, the script emits the
|
||||
value matching the IP address. If the pattern doesn't match
|
||||
(`clientip != null`), the script just returns the field value without crashing.
|
||||
the structure of Apache logs. If the pattern matches (`clientip != null`), the
|
||||
script emits the value of the matching IP address. If the pattern doesn't match,
|
||||
the script just returns the field value without crashing.
|
||||
|
||||
[source,console]
|
||||
----
|
||||
|
@ -418,4 +418,4 @@ defined it in the dissect pattern!
|
|||
}
|
||||
----
|
||||
// TESTRESPONSE[s/"took" : 2/"took": "$body.took"/]
|
||||
// TESTRESPONSE[s/"_id" : "GXx3H3kBKGE42WRNlddJ"/"_id": $body.hits.hits.0._id/]
|
||||
// TESTRESPONSE[s/"_id" : "GXx3H3kBKGE42WRNlddJ"/"_id": $body.hits.hits.0._id/]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue