Page MenuHomePhabricator

Prefix search returns subpage ahead of main page
Closed, ResolvedPublic

Description

unexpected suggestion order

seen on http://commons.wikimedia.beta.wmflabs.org/

In search box type "ma"

First result should be "Main Page" but is "Main Page/motd"

See screen shot for full results.


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz52886

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:48 AM
bzimport set Reference to bz52886.

After some digging it looks like prefix suggestions are being returned in the order of their database id rather than the page-rank like algorithm used in lsearchd. This might take me some time to fix....

I lied - it doesn't return them in order of their database id. That is a tiebreaker in case of ties, but we don't have a tie in this case. It is more confusing than that. I'm working on a solution though.

OK! I've got a solution working here:
https://gerrit.wikimedia.org/r/#/c/79789/

and tests here:
https://gerrit.wikimedia.org/r/#/c/79788/

Now the page with the most links to it will be returned by a prefix query, subpage or not. This is pretty much how the current search implementation works.

Change 79789 had a related patch set uploaded by Demon:
Return most relevent prefix search results.

https://gerrit.wikimedia.org/r/79789

Change 79789 merged by jenkins-bot:
Return most relevent prefix search results.

https://gerrit.wikimedia.org/r/79789

Live and working.