by Robin at 20240821
This commit is contained in:
parent
7a3754550f
commit
18e50bbd86
|
@ -228,11 +228,11 @@ func (es *ElasticSearch) FilterStreamerAcctList(ctx *gin.Context, req *streamera
|
|||
}
|
||||
|
||||
// 写入关于城市、星座的脚本打分
|
||||
if req.City != nil {
|
||||
if req.City != nil && util.DerefString(req.City) != "" {
|
||||
funcScoreQuery.AddScoreFunc(util.CreateKeywordScriptScoreFunction("city", util.DerefString(req.City), req.RefStreamerFilter.CityWeight))
|
||||
fullscore += 1.0
|
||||
}
|
||||
if req.Constellation != nil {
|
||||
if req.Constellation != nil && util.DerefString(req.Constellation) != "" {
|
||||
funcScoreQuery.AddScoreFunc(util.CreateKeywordScriptScoreFunction("constellation", util.DerefString(req.Constellation), req.RefStreamerFilter.ConstellationWeight))
|
||||
fullscore += 1.0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue