我有一个名为的索引find
和一个名为song
. 歌曲类型结构:
"_index": "find",
"_type": "song",
"_id": "192108",
"_source": {
"id": 192108,
"artist": "Melanie",
"title": "Dark Night",
"lyrics": "Hot air hangs like a dead man\nFrom a white oak tree",
"downloadCount": 234
}
由于多首歌曲可能具有相同的字段值,所以我需要通过诸如 downloadCount 之类的流行字段来提升结果。
如何更改以下查询以通过 downloadCount 进行优化?
GET /search/song/_search
{
"query": {
"multi_match": {
"query": "like a dead hangs",
"type": "most_fields",
"fields": ["artist","title","lyrics"],
"operator": "or"
}
}
}