From 0040ed4f6f7d2752664b38180297be4d5443ab83 Mon Sep 17 00:00:00 2001 From: Skye Book Date: Tue, 13 May 2014 12:48:42 -0400 Subject: [PATCH] Function score query: Add missing whitespace when throwing exception DecayFunctionParser throws a parse exception with a string containing "scaleand origin", this fixes the spacing issue. --- .../index/query/functionscore/DecayFunctionParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java b/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java index 95ddba4d7c1..67310f55931 100644 --- a/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java +++ b/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java @@ -200,7 +200,7 @@ public abstract class DecayFunctionParser implements ScoreFunctionParser { } } if (!scaleFound || !refFound) { - throw new ElasticsearchParseException("Both " + DecayFunctionBuilder.SCALE + "and " + DecayFunctionBuilder.ORIGIN + throw new ElasticsearchParseException("Both " + DecayFunctionBuilder.SCALE + " and " + DecayFunctionBuilder.ORIGIN + " must be set for numeric fields."); } IndexNumericFieldData numericFieldData = parseContext.getForField(mapper);