Background
Currently, the template search in both VE and Template Wizard searches for exact matches of keywords in template names, in order (similar to article search). This means that if you search "Dog", then "Infobox Dog" will not show in search results. This means users can only use the search to find the templates they already know exist and already know/remember the exact name of. We want to make it easier to find all relevant templates, even if users do not know or remember the exact title. This should not negatively impact users who are searching and do know the exact title.
Related phabricator tickets T257738: Allow TemplateWizard to search template descriptions, T162695: When inserting a template with the visual editor, search should find templates whose names match the substring
Current examples:
Template Dialog (VisualEditor and 2017 wikitext editor) | TemplateWizard (2010 wikitext editor) |
Requirements
- Search for search term in both the template name and template description. Prioritize results with matches in name and description, then just name, then just description.
- Change bolding to match new article search: bold all parts of template name which do not include the search term. This helps to highlight and scan the differences between the results, which is used for easy comparison.
- Adjust the search algorithm and results displayed in both the VisualEditor Template Dialog and the TemplateWizard (source editor)
Mock
(Not necessarily the actual order they should appear in after changes)
Open questions
- Is order currently based on how often the template is used if multiple results? What is the current 'relevance' ordering algorithm based on?