feat-IRONFANS-198-Robin #718

Merged
chenhao merged 11 commits from feat-IRONFANS-198-Robin into main 2024-09-02 18:37:03 +08:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 18e50bbd86 - Show all commits

View File

@ -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
}