Page MenuHomePhabricator

ZObjectSelector: Improve result sorting algorithm
Open, LowPublic



Currently, the api wikilambdasearch_labels orders the result by minimizing the levenshtein distance, which is quick and also part of the php standard library.

This ranking could improve significantly, for example:

  • It could favor those results where the matching substring occurs earlier in the string. (E.g. when searching for "And", currently the match would be the same with "Android" and with "farmland", but it would make sense to show "Android" on top)
  • It could also favor those matches that occur in the user language or its fallbacks.

More details

Desired behavior/Acceptance criteria

  • Should improve ranking results
  • Should not increase run times excessively

Completion checklist