From 1863ab95f862294db7d105717656bd6452eef9d9 Mon Sep 17 00:00:00 2001 From: Jerry Liu Date: Mon, 27 Jun 2016 08:20:23 -0400 Subject: [PATCH] fixed typo 'if' -> 'is' (#19051) --- .../aggregations/metrics/scripted-metric-aggregation.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc b/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc index 639fabb62fd..ba9899f9d68 100644 --- a/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc @@ -101,7 +101,7 @@ In the above example, the `init_script` creates an array `transactions` in the ` map_script:: Executed once per document collected. This is the only required script. If no combine_script is specified, the resulting state needs to be stored in an object named `_agg`. + -In the above example, the `map_script` checks the value of the type field. If the value if 'sale' the value of the amount field +In the above example, the `map_script` checks the value of the type field. If the value is 'sale' the value of the amount field is added to the transactions array. If the value of the type field is not 'sale' the negated value of the amount field is added to transactions.