From 464e4a6b2289a7d9e6fada555c4bae75f20a8f4e Mon Sep 17 00:00:00 2001 From: Vilem Duha Date: Tue, 9 Jul 2019 01:25:43 +0200 Subject: BlenderKit: fix ordering in search. This now works much better than previously, using score for categories and relevance for keyword search. --- blenderkit/search.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/blenderkit/search.py b/blenderkit/search.py index b7239e38..6c1cc955 100644 --- a/blenderkit/search.py +++ b/blenderkit/search.py @@ -714,6 +714,13 @@ class Searcher(threading.Thread): if i < len(query) - 1: requeststring += '+' + # result ordering: _score - relevance, score - BlenderKit score + if query.get('category_subtree') is not None: + requeststring += '+order:_score,-score' + else: + requeststring += '+order:-score' + + requeststring += '&addon_version=%s' % params['addon_version'] if params.get('scene_uuid') is not None: requeststring += '&scene_uuid=%s' % params['scene_uuid'] -- cgit v1.2.3