From 1d9905a798e350f4a732790cb8731df8ab016059 Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Wed, 2 Sep 2015 12:13:15 +0100 Subject: [PATCH] [DOCS] Added note about valid return types for scripts in the scripted_metric aggregation --- .../metrics/scripted-metric-aggregation.asciidoc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc b/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc index 6db8c82a9e8..639fabb62fd 100644 --- a/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc @@ -79,7 +79,16 @@ The above example can also be specified using file scripts as follows: <1> script parameters for init, map and combine scripts must be specified in a global `params` object so that it can be share between the scripts -For more details on specifying scripts see <>. +For more details on specifying scripts see <>. + +==== Allowed return types + +Whilst and valid script object can be used within a single script. the scripts must return or store in the `_agg` object only the following types: + +* primitive types +* String +* Map (containing only keys and values of the types listed here) +* Array (containing elements of only the types listed here) ==== Scope of scripts