From 5e0f67b5163b697b29de9c15ba4b7c8f042d7ca4 Mon Sep 17 00:00:00 2001 From: Philipp Jardas Date: Tue, 9 Sep 2014 17:37:30 +0200 Subject: [PATCH] Fixed explanation for GaussDecayFunction The explanation now gives the correct value instead of the negative. --- .../query/functionscore/gauss/GaussDecayFunctionParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/index/query/functionscore/gauss/GaussDecayFunctionParser.java b/src/main/java/org/elasticsearch/index/query/functionscore/gauss/GaussDecayFunctionParser.java index 374bd6ea0d1..7a2f8d1cfc2 100644 --- a/src/main/java/org/elasticsearch/index/query/functionscore/gauss/GaussDecayFunctionParser.java +++ b/src/main/java/org/elasticsearch/index/query/functionscore/gauss/GaussDecayFunctionParser.java @@ -47,7 +47,7 @@ public class GaussDecayFunctionParser extends DecayFunctionParser { public Explanation explainFunction(String valueExpl, double value, double scale) { ComplexExplanation ce = new ComplexExplanation(); ce.setValue((float) evaluate(value, scale)); - ce.setDescription("-exp(-0.5*pow(" + valueExpl + ",2.0)/" + -1 * scale + ")"); + ce.setDescription("exp(-0.5*pow(" + valueExpl + ",2.0)/" + -1 * scale + ")"); return ce; }