Skip to content
Snippets Groups Projects
Commit 464e4a6b authored by Vilem Duha's avatar Vilem Duha
Browse files

BlenderKit: fix ordering in search.

This now works much better than previously, using score for categories and relevance for keyword search.
parent f6116744
Branches
No related tags found
No related merge requests found
...@@ -714,6 +714,13 @@ class Searcher(threading.Thread): ...@@ -714,6 +714,13 @@ class Searcher(threading.Thread):
if i < len(query) - 1: if i < len(query) - 1:
requeststring += '+' 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'] requeststring += '&addon_version=%s' % params['addon_version']
if params.get('scene_uuid') is not None: if params.get('scene_uuid') is not None:
requeststring += '&scene_uuid=%s' % params['scene_uuid'] requeststring += '&scene_uuid=%s' % params['scene_uuid']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment