Page MenuHomePhabricator

Get nearby articles by relevance instead of geographical distance
Closed, ResolvedPublic8 Estimated Story Points

Description

We're currently using geosearch to get identify relevant results for the nearby view. This is not ideal because results are ranked by distance to the center point of the search. Instead we want to get the results within a region ranked by "relevance".

  • Add an option to the GeoData geosearch endpoint[1][2] to allow results by CirrusSearch search page ranks
  • Add a sort keyword that defaults to the current order of results by distance to the center
  • If sort has any other value than distance the content should be forwarded to the CirrusSearch's sort [3]
  • If sort has the value relevance the results should be fetched by relevance and the list returned is ordered by relevance
  • The feature should work on a bounding box and with a center point and distance

[1] https://www.mediawiki.org/wiki/API:Geosearch
[2] https://github.com/wikimedia/mediawiki-extensions-GeoData/blob/master/includes/Api/QueryGeoSearchElastic.php
[3] https://www.mediawiki.org/wiki/Help:CirrusSearch#Explicit_sort_orders

Event Timeline

WMDE-Fisch set the point value for this task to 8.May 3 2022, 9:05 AM
thiemowmde renamed this task from Get articles by search rank instead of distance to Get nearby articles by relevance instead of geographical distance.May 3 2022, 3:52 PM
thiemowmde updated the task description. (Show Details)

Change 789143 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/GeoData@master] Sort by relevance for CirrusSearch geosearch

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

Change 789795 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Kartographer@master] Show articles by relevance instead of geographical distance

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

Change 789143 merged by jenkins-bot:

[mediawiki/extensions/GeoData@master] Sort by relevance for CirrusSearch geosearch

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

Change 789795 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Show articles by relevance instead of geographical distance

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