Page MenuHomePhabricator

Search results (for links, redirects, categories…) should select the exact match by default
Closed, ResolvedPublic1 Estimated Story Points

Description

This is somewhat related to T64917: Give exact match when looking for a specific file.

When you add an internal link, or otherwise are looking at search results, VisualEditor should defaultly select any page that is an exact match for what you've typed. In particular, if you search for "Computer", and there actually is a page at [[Computer]], then it should default to [[Computer]], not to [[Computer science]] or whatever else comes up first in the search system.


Version: unspecified
Severity: enhancement
See Also:
T71780: If there is a page with the exact name, it should appear first in the link auto-complete list
T57390: VisualEditor: The link suggestor should suggest links from the current namespace ahead of named links
T64917: Give exact match when looking for a specific file
T71716: Search results (for links, redirects, categories…) should select the exact match by default

Details

Reference
bz69716

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:41 AM
bzimport set Reference to bz69716.

This is aggravated if the exact match is a redirect, because matching redirects are in a separate section of the suggester, and the auto select only considers the first match in the 'articles' section of the suggester.

When trying to link to the en.wp redirect "Republic of Vietnam" by typing this directly into the link dialog, the article "Republic of Vietnam Airborne Division" is selected. Ideally, as I type, I would expect that the exact redirect match of "Republic of Vietnam is chosen and that after done, I get: [[Republic_of_Vietnam_Airborne_Division|Republic of Vietnam]].

Jdforrester-WMF lowered the priority of this task from High to Medium.Jan 15 2015, 12:33 AM
Jdforrester-WMF set Security to None.
Jdforrester-WMF renamed this task from VisualEditor: Search results (for links, redirects, categories…) should select the exact match by default to Search results (for links, redirects, categories…) should select the exact match by default.Jul 3 2015, 4:31 PM
Jdforrester-WMF moved this task from Freezer to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 1.

Current situation:

  • If you type "fool" and press return or click "Insert" you get a link to "fool", even if it doesn't appear in the suggestions list.
  • If you type "fool" and there are no title matches, you'll get what you've typed in as a redlink suggestion.
  • If you type "fool" and the only title match result is "Fool's gold" as a redirect to "Pyrite", you'll get the latter shown first with the former directly below it. You won't get a redlink suggestion.
  • If you type "fool" and there are several title match results, the "best" match from the search engine will show first even if that isn't the closest match.

I think this is "good enough", and much better than when this task was filed.