diff --git a/src/main/java/org/elasticsearch/common/lucene/search/function/FunctionScoreQuery.java b/src/main/java/org/elasticsearch/common/lucene/search/function/FunctionScoreQuery.java index 66f46466eba..0d1e08c42b6 100644 --- a/src/main/java/org/elasticsearch/common/lucene/search/function/FunctionScoreQuery.java +++ b/src/main/java/org/elasticsearch/common/lucene/search/function/FunctionScoreQuery.java @@ -168,8 +168,9 @@ public class FunctionScoreQuery extends Query { @Override public float score() throws IOException { - return scoreCombiner.combine(subQueryBoost, scorer.score(), - function.score(scorer.docID(), scorer.score()), maxBoost); + float score = scorer.score(); + return scoreCombiner.combine(subQueryBoost, score, + function.score(scorer.docID(), score), maxBoost); } @Override