Skip to content

Commit 5977e06

Browse files
committed
Merge remote-tracking branch 'origin/esql-decay-function' into esql-decay-function
2 parents a99587e + 7477619 commit 5977e06

File tree

1 file changed

+3
-4
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/score

1 file changed

+3
-4
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/score/Decay.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ static double processDateNanos(
505505
}
506506

507507
private enum DecayFunction {
508-
LINEAR("linear"){
508+
LINEAR("linear") {
509509
@Override
510510
public double numericDecay(double value, double origin, double scale, double offset, double decay) {
511511
return new ScoreScriptUtils.DecayNumericLinear(origin, scale, offset, decay).decayNumericLinear(value);
@@ -528,7 +528,7 @@ public double temporalDecay(long value, long origin, long scale, long offset, do
528528
}
529529
},
530530

531-
EXPONENTIAL("exp"){
531+
EXPONENTIAL("exp") {
532532
@Override
533533
public double numericDecay(double value, double origin, double scale, double offset, double decay) {
534534
return new ScoreScriptUtils.DecayNumericExp(origin, scale, offset, decay).decayNumericExp(value);
@@ -551,7 +551,7 @@ public double temporalDecay(long value, long origin, long scale, long offset, do
551551
}
552552
},
553553

554-
GAUSSIAN("gauss"){
554+
GAUSSIAN("gauss") {
555555
@Override
556556
public double numericDecay(double value, double origin, double scale, double offset, double decay) {
557557
return new ScoreScriptUtils.DecayNumericGauss(origin, scale, offset, decay).decayNumericGauss(value);
@@ -574,7 +574,6 @@ public double temporalDecay(long value, long origin, long scale, long offset, do
574574
}
575575
};
576576

577-
578577
private final String functionName;
579578
private static final Map<String, DecayFunction> BY_NAME = Arrays.stream(values())
580579
.collect(Collectors.toMap(df -> df.functionName, df -> df));

0 commit comments

Comments
 (0)