Merge lp:~wgrant/launchpad/picker-sorting into lp:launchpad
Status: | Merged |
---|---|
Approved by: | William Grant |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13210 |
Proposed branch: | lp:~wgrant/launchpad/picker-sorting |
Merge into: | lp:launchpad |
Diff against target: |
352 lines (+176/-16) 5 files modified
lib/lp/bugs/javascript/bugtask_index.js (+2/-2) lib/lp/registry/tests/test_person_vocabularies.py (+99/-4) lib/lp/registry/tests/test_product_vocabularies.py (+26/-0) lib/lp/registry/vocabularies.py (+45/-10) lib/lp/services/features/flags.py (+4/-0) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/picker-sorting |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email:
|
Commit message
[r=jcsackett][bug=172702,255282,
Description of the change
The project and person pickers are hilariously bad at returning relevant matches. Until recently, the person picker found all even slightly relevant results and sorted them alphabetically. It's now slightly better, but the project picker still does it alphabetically. This branch hopefully fixes all these problems.
The person picker is now context-sensitive. If the context is within a pillar, people who have touched the project or distribution receive a rank bonus, boosting them towards the top of the results. For this purpose, "touched the project" is defined as having at least 10 karma in the relevant context. The scaling factor is the base-10 logarithm of the karma value, as that seems to work well on dogfood for both large and small projects, with wide varieties of contribution levels. That's all easily tweakable later, at any rate. Surprisingly, it doesn't seem to perform too badly either.
I also downscaled the hardcoded ranks for exact/prefix matches of some person attributes. Their ordering was not changed. The new affiliation bonus is behind its own feature flag, inside the existing new ranking algorithm which is behind another.
This has the downside of not working for teams, as they do not have karma. While there are some possible paths for investigation (eg. average karma of the members), teams names tend to be less ambiguous and more easily searchable than people, so it's probably OK as it is.
The project picker is a bit simpler. It adds a new, flagged ranking algorithm that is a bit less useless than displayname. An exact name match is first, followed by ranked FTI matches. This seems to work pretty well. Just like teams, I found that affiliation ranking was less necessary here, as project names tend to be far more unique.
William--
This looks good to land.