From e6eeadd17162280b049b2954fdf86a0d298ac30f Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Thu, 27 Aug 2015 22:00:52 +0200 Subject: [PATCH] [test] make sure that the scripts in testScoreAccessWithinScript never compute log(0) --- .../search/functionscore/RandomScoreFunctionIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java index f00e95d6e44..d3ff321d65f 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java @@ -121,7 +121,7 @@ public class RandomScoreFunctionIT extends ESIntegTestCase { int docCount = randomIntBetween(100, 200); for (int i = 0; i < docCount; i++) { - client().prepareIndex("test", "type", "" + i).setSource("body", randomFrom(newArrayList("foo", "bar", "baz")), "index", i) + client().prepareIndex("test", "type", "" + i).setSource("body", randomFrom(newArrayList("foo", "bar", "baz")), "index", i + 1)// we add 1 to the index field to make sure that the scripts below never compute log(0) .get(); } refresh();