我有一個名爲find
的索引和一個名爲song
的類型。 宋式結構:Elasticsearch增強
"_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"
}
}
}
2兩說不定之間索引首歌,一首歌有一點點的最好成績,而另一首歌曲是最流行的用戶之間,有更多的下載量。我需要通過分數與downloadCount字段值的組合對結果進行排名。 – Mehmed