last_run_metadata_path
where a.updated_at > :sql_last_value or b.updated_at > :sql_last_value
vim mysql/last_value_meta
params script脚本的入参
文档内对应location字段
haversin(lat,lon,doc['location'].lat,doc['location'].lon) //计算距离
lang:expression 表达式
scripte_fields 自定义字
GET /shop/_search
{
"query":{
"match": {"name":"凯悦"}
},
"_source": "*",
"script_fields":{
"distance":{
"script":{
"source":"haversin(lat, lon, doc['location'].lat, doc['location'].lon)",
"lang":"expression",
"params":{"lat":31.37,"lon":127.12}
}
}
},
"sort": [
{
"_geo_distance":{
}
}
]
搜索排序模型
召回完成后排序
更加精细的
function_score排序模型
seller_remark_score商家评分
sort
"_score"
文本相关性内容
距离和评分
boost_mode:replace 一般为sum