From 6cc5c8df50d7ca3e1c7be296ea6872ce94151722 Mon Sep 17 00:00:00 2001 From: Cal Date: Wed, 21 Feb 2024 14:00:56 -0700 Subject: [PATCH] change lunr weighting --- evennia/commands/default/help.py | 6 +++--- evennia/help/utils.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/evennia/commands/default/help.py b/evennia/commands/default/help.py index 9a1aa0fa76..9956a23c08 100644 --- a/evennia/commands/default/help.py +++ b/evennia/commands/default/help.py @@ -480,9 +480,9 @@ class CmdHelp(COMMAND_DEFAULT_CLASS): # lunr search fields/boosts search_fields = [ {"field_name": "key", "boost": 10}, - {"field_name": "aliases", "boost": 9}, - {"field_name": "no_prefix", "boost": 8}, - {"field_name": "category", "boost": 7}, + {"field_name": "aliases", "boost": 7}, + {"field_name": "no_prefix", "boost": 6}, + {"field_name": "category", "boost": 5}, {"field_name": "tags", "boost": 1}, # tags are not used by default ] match, suggestions = None, None diff --git a/evennia/help/utils.py b/evennia/help/utils.py index 41ae5a2b9b..5ef3157ca9 100644 --- a/evennia/help/utils.py +++ b/evennia/help/utils.py @@ -88,8 +88,8 @@ def help_search_with_index(query, candidate_entries, suggestion_maxnum=5, fields if not fields: fields = [ {"field_name": "key", "boost": 10}, - {"field_name": "aliases", "boost": 9}, - {"field_name": "category", "boost": 8}, + {"field_name": "aliases", "boost": 7}, + {"field_name": "category", "boost": 6}, {"field_name": "tags", "boost": 5}, ]