4
2018-06-21 10:51:07 +08:00 via Android
GET /xxxxxx-v2/song/_search?explain
{
"query": {
"function_score": {
"query": {
"bool": {
"should": [
{
"match_phrase_prefix": {
"name": {
"query": "我的一个道姑朋",
"boost": 2
}
}
},
{
"nested": {
"path": "artists",
"query": {
"bool": {
"should": [
{
"match_phrase": {
"artists.name": "我的一个"
}
}
]
}
}
}
}
]
}
},
"field_value_factor": {
"field": "score",
"modifier": "log1p",
"factor": 0.1
},
"boost_mode": "sum"
}
},
"sort": {
"_score": {
"order": "desc"
}
}
}
仅供参考