Merge pull request 'by Robin at 20240903 scale = 1' (#722) from feat-IRONFANS-198-Robin into main

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/722
This commit is contained in:
chenhao 2024-09-03 16:10:32 +08:00
commit 0e6ba01fa7
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)
}