es7 门店搜索杂记

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值