by Robin at 20240903 scale = 1 #722

Merged
chenhao merged 1 commits from feat-IRONFANS-198-Robin into main 2024-09-03 16:10:33 +08:00
1 changed files with 3 additions and 0 deletions

View File

@ -412,6 +412,9 @@ func CreateGaussDecayFunction(name string, filter *Int64Filter, refFilter *Int64
origin := float64(lb+ub) / 2
offset := float64(-lb+ub) / 2
scale := (origin - offset) * refFilter.ScaleCoeff
if scale == 0 {
scale = 1
}
return elastic.NewGaussDecayFunction().FieldName(name).Origin(origin).Offset(offset).Scale(scale).Decay(refFilter.Decay).Weight(refFilter.Weight)
}