From 8ad404ae08eee79d586529679395906979dfeeda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 25 Aug 2021 12:35:22 +0200 Subject: [PATCH] [DOCS] Fixes a syntax error in datafeed runtime field example. (#76917) (#76919) --- .../ml/anomaly-detection/ml-configuring-transform.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ml/anomaly-detection/ml-configuring-transform.asciidoc b/docs/reference/ml/anomaly-detection/ml-configuring-transform.asciidoc index 9d02c3d011eac..ef442b4b92913 100644 --- a/docs/reference/ml/anomaly-detection/ml-configuring-transform.asciidoc +++ b/docs/reference/ml/anomaly-detection/ml-configuring-transform.asciidoc @@ -392,7 +392,7 @@ POST _ml/datafeeds/datafeed-test2/_update "my_runtime_field": { "type": "keyword", "script": { - "source": "emit(def m = /(.*)-bar-([0-9][0-9])/.matcher(doc['tokenstring3'].value); return m.find() ? m.group(1) + '_' + m.group(2) : '';)" <1> + "source": "def m = /(.*)-bar-([0-9][0-9])/.matcher(doc['tokenstring3'].value); emit(m.find() ? m.group(1) + '_' + m.group(2) : '');" <1> } } }