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