From 30d342c87c9040058a3f4b684e59fc87f23f2bc8 Mon Sep 17 00:00:00 2001 From: Clinton Gormley Date: Mon, 14 Nov 2016 09:38:12 +0100 Subject: [PATCH] Update significantterms-aggregation.asciidoc Fix scripted significant terms example to use `params.` prefix for painless --- .../bucket/significantterms-aggregation.asciidoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc b/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc index 61deffeccd2..172a528fcb3 100644 --- a/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc @@ -353,7 +353,10 @@ Customized scores can be implemented via a script: -------------------------------------------------- "script_heuristic": { - "script": "_subset_freq/(_superset_freq - _subset_freq + 1)" + "script": { + "lang": "painless", + "inline": "params._subset_freq/(params._superset_freq - params._subset_freq + 1)" + } } --------------------------------------------------