diff --git a/pillar/api/search/queries.py b/pillar/api/search/queries.py index 527f9d8b..6ece0114 100644 --- a/pillar/api/search/queries.py +++ b/pillar/api/search/queries.py @@ -129,7 +129,12 @@ def do_user_search_admin(query: str) -> dict: # We most likely got and id field. we should find it. if len(query) == len('563aca02c379cf0005e8e17d'): - should.append(Q('term', objectID=query)) + should.append({'term': { + 'objectID': { + 'value': query, # the thing we're looking for + 'boost': 100, # how much more it counts for the score + } + }}) search = Search(using=client) search.query = Q('bool', should=should)