Page MenuHomePhabricator

Special:Nearby has wrong sort order when searching by page
Closed, ResolvedPublic

Description

Compare https://en.wikipedia.org/wiki/Special:Nearby#/page/Empire_State_Building
to https://en.wikipedia.org/wiki/Special:Nearby#/coord/40.748433,-73.985656

When searching by coordinate the sort order is correct, but when searching by page the sorting is lost. It looks like searching by geocordinate is re-sorting after retrieving the pages from api, while by page is not. Because the api is being used as a generator the returned sort order is completely arbitrary.

Remaining work

  • Sort by index given by GeoData (thanks @MaxSem!) in Nearby special page

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 6 2016, 11:42 PM

Normal search deals with that here: https://github.com/wikimedia/mediawiki/blob/master/includes/api/ApiQuerySearch.php#L297-L299

Which allows the frontend to see the original sort order and re-sort the generator output. api maintainers identified too many edge cases to do that resort on the generator output

EBernhardson updated the task description. (Show Details)Jun 7 2016, 2:57 PM
jhobs triaged this task as Normal priority.Jun 7 2016, 5:12 PM
jhobs moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
MaxSem claimed this task.Jun 7 2016, 9:09 PM

Change 293244 had a related patch set uploaded (by MaxSem):
Add index to results in generator mode

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

Change 293244 merged by jenkins-bot:
Add index to results in generator mode

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

jhobs updated the task description. (Show Details)Jun 16 2016, 8:38 PM
jhobs updated the task description. (Show Details)
jhobs removed a project: Patch-For-Review.
jhobs updated the task description. (Show Details)Jun 16 2016, 8:40 PM
EBernhardson closed this task as Resolved.Dec 13 2016, 6:32 PM

sorting order looks fixed from max's patch.