首页 > 其他 > 详细

每日任务推荐的ES查询规则

时间:2020-04-21 19:47:01      阅读:81      评论:0      收藏:0      [点我收藏+]

GET / mc_mission / mission / _search {
"query": {
"function_score": {
"query": {
"bool": {
"must": [

{
"term": {
"mission_factors": "营养"
}
},
{
"term": {
"mission_status": 1
}
},
[{
"term": {
"suitable_tags": "水"
}
},
{
"term": {
"suitable_tags": "膳食种类"
}
}
],
{
"match": {
"finish_action.model_name": "default "
}
}
],
"must_not": [{
"term": {
"recommend": 0
}
}]
}

},
"functions": [

{
"filter": {
"term": {
"suitable_tags": "水"
}
},
"weight": 100
},
{
"filter": {
"term": {
"suitable_tags": "膳食种类"
}
},
"weight": 100
},
{
"filter": {
"term": {
"suitable_tags": "脑血栓"
}
},
"weight": -10000
}

],
"boost_mode": "replace",
"score_mode": "sum"

}
},
"size": 20


}

每日任务推荐的ES查询规则

原文:https://www.cnblogs.com/yazhong-java/p/12747145.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!