Page MenuHomePhabricator

Improve typeahead behavior with mixed-case matches
ClosedPublic

Authored by epriestley on Nov 8 2016, 7:40 PM.
Tags
None
Referenced Files
F18797411: D16826.diff
Fri, Oct 17, 5:01 AM
F18738077: D16826.id.diff
Oct 1 2025, 1:58 PM
F18732747: D16826.diff
Sep 30 2025, 7:40 PM
F18622467: D16826.id40517.diff
Sep 15 2025, 11:56 AM
F18541999: D16826.id40517.diff
Sep 7 2025, 10:06 PM
F18458385: D16826.id40517.diff
Sep 1 2025, 2:21 PM
F18438432: D16826.id.diff
Aug 31 2025, 1:21 PM
F18423830: D16826.diff
Aug 30 2025, 8:11 PM
Subscribers
None

Details

Summary

Ref T8510. We had two issues with mixed-case result sorting, like typing @joe to match user Joe.

  • The fallback sort was not normalized properly, so "J" could sort after "j". Instead, normalize values for sorting.
  • The prefix_hits and older priority_hits mechanisms were competing destructively. The prefix_hits mechanism completely replaces the priority_hits mechanism. Instead, use only the prefix_hits mechanism.
Test Plan
  • Copied results for "joe" from WMF.
  • Hard-coded the controller to return them.
  • Searched for @joe.
  • After patches, first hit is user "Joe".

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve typeahead behavior with mixed-case matches.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Nov 8 2016, 7:41 PM
This revision was automatically updated to reflect the committed changes.