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"
}
}
}
어쩌면 사이에 두 개의 인덱스 노래는, 노래는 조금 최고 점수를 가지고 있지만 다른 노래는 사용자들 사이에서 가장 인기가 많은 다운로드가 있습니다. score와 downloadCount 필드 값의 조합으로 결과의 순위를 매길 필요가 있습니다. – Mehmed