Page MenuHomePhabricator

Use CirrusSearch API and nearcoord: keyword for the Kartographer nearby search
Closed, ResolvedPublic2 Estimated Story Points

Description

This is about the current WIP implementation of a nearby feature on Kartographer maps. After the extension of the geosearch API to support relevance sort and a follow-up discussion with the search team there was the conclusion that we should rather use the nearcoord: keyword from the search API to get the results for the nearby feature.

See T309857: Increase the default radius limit for geosearch and T306894: Investigation: How can we make better use of the geosearch

So let's change the current implementation to use search instead of geosearch and filter the area by using the nearcoord keyword.

See also the POC for this https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Kartographer/+/786847

What still needs to be done to make the POC work is calculating a sane radius from the bounding box data we have about the current map.

Event Timeline

WMDE-Fisch set the point value for this task to 5.

How is nearcoord fed ? Also by the {{#coord}} keyword of geodata extension ? I couldn't find that documented on https://www.mediawiki.org/wiki/Help:CirrusSearch.
I'm assuming that also means it only does title/primary coords right ?

WMDE-Fisch removed the point value for this task.Aug 4 2022, 9:13 AM

Very good questions.

How is nearcoord fed ? Also by the {{#coord}} keyword of geodata extension ? I couldn't find that documented on https://www.mediawiki.org/wiki/Help:CirrusSearch.

It's introduced with the GeoData extension so it uses the data from {{#coord}}. The help page should probably include a hint on that.

See https://gerrit.wikimedia.org/g/mediawiki/extensions/GeoData/+/c62fffea4b0ecbebfe2fbdea2daf8242cfcccee0/includes/Search/CirrusNearCoordFilterFeature.php

I'm assuming that also means it only does title/primary coords right ?

Yes, see https://gerrit.wikimedia.org/g/mediawiki/extensions/GeoData/+/c62fffea4b0ecbebfe2fbdea2daf8242cfcccee0/includes/Search/CirrusNearTitleFilterFeature.php#94

WMDE-Fisch renamed this task from Use CirrusSearch API and nearcoord: keyword for nearby search to Use CirrusSearch API and nearcoord: keyword for the Kartographer nearby search.Aug 4 2022, 9:28 AM
WMDE-Fisch updated the task description. (Show Details)

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

[mediawiki/extensions/Kartographer@master] [WIP] Use nearcoord search to get nearby articles

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

Change 821692 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Fix nearby search failing when nothing can be found

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

Change 786847 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Use nearcoord search to get nearby articles

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

Change 821692 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Fix nearby search failing when nothing can be found

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

WMDE-Fisch set the point value for this task to 2.