es 使用 function_score 时报错 NaN
使用 function_score 自定义评分时,进行搜索,提示如下错误
elasticsearch.exceptions.TransportError: TransportError(500, 'search_phase_execution_exception', 'function score query returned an invalid score: NaN for doc: 866')
在 function_score 的 source 字段进行判断:如果是 NaN ,则手动赋值分数为 9
原创
2021-11-11 17:08:54 ·
2437 阅读 ·
0 评论