Homec4science

Improve typeahead behavior with mixed-case matches

Authored by epriestley <git@epriestley.com> on Nov 8 2016, 20:31.

Description

Improve typeahead behavior with mixed-case matches

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".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8510

Differential Revision: https://secure.phabricator.com/D16826

Details

Committed
epriestley <git@epriestley.com>Nov 8 2016, 20:50
Pushed
aubortJan 31 2017, 17:16
Parents
rPHafa1bb286044: Fix some grammatical gender constants
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH9a10413dbc88: Improve typeahead behavior with mixed-case matches (authored by epriestley <git@epriestley.com>).Nov 8 2016, 20:50