Merge pull request #3434 from InspectorCaracal/help-fixes-1
Patches to improve "help" usability
This commit is contained in:
commit
ca6ea0c0aa
3 changed files with 5 additions and 14 deletions
|
|
@ -480,9 +480,9 @@ class CmdHelp(COMMAND_DEFAULT_CLASS):
|
||||||
# lunr search fields/boosts
|
# lunr search fields/boosts
|
||||||
search_fields = [
|
search_fields = [
|
||||||
{"field_name": "key", "boost": 10},
|
{"field_name": "key", "boost": 10},
|
||||||
{"field_name": "aliases", "boost": 9},
|
{"field_name": "aliases", "boost": 7},
|
||||||
{"field_name": "no_prefix", "boost": 8},
|
{"field_name": "no_prefix", "boost": 6},
|
||||||
{"field_name": "category", "boost": 7},
|
{"field_name": "category", "boost": 5},
|
||||||
{"field_name": "tags", "boost": 1}, # tags are not used by default
|
{"field_name": "tags", "boost": 1}, # tags are not used by default
|
||||||
]
|
]
|
||||||
match, suggestions = None, None
|
match, suggestions = None, None
|
||||||
|
|
|
||||||
|
|
@ -55,13 +55,4 @@ HELP_ENTRY_DICTS = [
|
||||||
|
|
||||||
""",
|
""",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "building",
|
|
||||||
"category": "building",
|
|
||||||
"text": """
|
|
||||||
Evennia comes with a bunch of default building commands. You can
|
|
||||||
find a beginner tutorial in the Evennia documentation.
|
|
||||||
|
|
||||||
""",
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,8 @@ def help_search_with_index(query, candidate_entries, suggestion_maxnum=5, fields
|
||||||
if not fields:
|
if not fields:
|
||||||
fields = [
|
fields = [
|
||||||
{"field_name": "key", "boost": 10},
|
{"field_name": "key", "boost": 10},
|
||||||
{"field_name": "aliases", "boost": 9},
|
{"field_name": "aliases", "boost": 7},
|
||||||
{"field_name": "category", "boost": 8},
|
{"field_name": "category", "boost": 6},
|
||||||
{"field_name": "tags", "boost": 5},
|
{"field_name": "tags", "boost": 5},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue