[TEST] fix rounding issue
This commit is contained in:
parent
b0cf929637
commit
1138a6ae60
|
@ -244,13 +244,13 @@ public class FunctionScoreTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
}
|
||||
|
||||
protected float computeExpectedScore(float[] weights, float[] scores, String scoreMode) {
|
||||
float expectedScore = 0.0f;
|
||||
protected double computeExpectedScore(float[] weights, float[] scores, String scoreMode) {
|
||||
double expectedScore = 0.0;
|
||||
if ("multiply".equals(scoreMode)) {
|
||||
expectedScore = 1.0f;
|
||||
expectedScore = 1.0;
|
||||
}
|
||||
if ("max".equals(scoreMode)) {
|
||||
expectedScore = Float.MAX_VALUE * -1.0f;
|
||||
expectedScore = Float.MAX_VALUE * -1.0;
|
||||
}
|
||||
if ("min".equals(scoreMode)) {
|
||||
expectedScore = Float.MAX_VALUE;
|
||||
|
|
Loading…
Reference in New Issue