Page MenuHomePhabricator

Better search - search for keywords out of order in template search (Template findability)
Open, Needs TriagePublic

Description

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: Please 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?

Event Timeline

Lena_WMDE updated the task description. (Show Details)
ECohen_WMDE renamed this task from DRAFT: (Template Findability, VE TemplateDialog, Template Wizard) Search for keywords out of order in template search / Fuzzier search to Fuzzier search - search for keywords out of order in template search (Template findability).Jan 13 2021, 8:59 AM

I want to clarify between "full-text" and "fuzzy": we want to switch from a prefix search to full-text search indexed over several fields. But do we also want that search to be fuzzy e.g. "infobux dug" would return "infobox dog" rather than no matches? Or should that be explicitly out-of-scope unless trivial in the course of implementing full-text?

Lena_WMDE renamed this task from Fuzzier search - search for keywords out of order in template search (Template findability) to Better search - search for keywords out of order in template search (Template findability).Wed, Apr 28, 8:52 AM

Change 684284 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[operations/mediawiki-config@master] [beta] Enable new search feature for the template dialog

https://gerrit.wikimedia.org/r/684284

Change 684284 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] Enable new search features for the template dialog

https://gerrit.wikimedia.org/r/684284

Mentioned in SAL (#wikimedia-cloud) [2021-05-03T13:55:21Z] <CFisch_WMDE> enable new search features for the template dialog (T271802)