mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
change lunr weighting
This commit is contained in:
parent
1f4cd76e5f
commit
6cc5c8df50
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue