do not call score() twice

This commit is contained in:
Britta Weber 2013-12-02 17:34:56 +01:00
parent a7bb28c0e7
commit df9b8ae02e
1 changed files with 3 additions and 2 deletions

View File

@ -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