Cannot click svwikisource search results when running a crosswiki search on svwiki
Closed, ResolvedPublic

Description

This is due to a special configuration done on svwiki where the interwiki prefix is src instead of s.
This special case is handled in WikimediaMaintenance DumpInterwiki with the following code :

/**
 * Special case prefix rewrites, for the benefit of Swedish which uses s:t
 * as an abbreviation for saint
 */
protected static $prefixRewrites = [
        'svwiki' => [ 's' => 'src' ],
];

Sadly it's hard to reuse such information because the InterwikiCache generated is not suited for the kind of lookup we do in CirrusSearch.
Externalizing the config from DumpInterwiki to wmf-config is also not trivial (wmf-config generates a config per wiki but DumpInterwiki is designed to work for all wikis by inspecting database files and such)
The sole solution that does not involve a giant refactor of how interwiki data is exposed from core is to duplicate this information as a cirrus config var.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 11 2017, 8:19 AM

Change 383815 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/CirrusSearch@master] Add a way to override interwiki prefixes

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

dcausse moved this task from Backlog to Needs review on the Discovery-Search (Current work) board.
dcausse claimed this task.

Change 383815 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Add a way to override interwiki prefixes

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

debt triaged this task as Normal priority.Oct 18 2017, 3:55 PM
debt closed this task as Resolved.

Change 389976 had a related patch set uploaded (by DCausse; owner: DCausse):
[operations/mediawiki-config@master] [cirrus] Add overridden iw prefix for svwiki

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

Change 389976 merged by jenkins-bot:
[operations/mediawiki-config@master] [cirrus] Add overridden iw prefix for svwiki

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

Change 389986 had a related patch set uploaded (by DCausse; owner: DCausse):
[operations/mediawiki-config@master] [cirrus] Add overridden iw prefix for svwiki

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

Change 389986 merged by jenkins-bot:
[operations/mediawiki-config@master] [cirrus] Add overridden iw prefix for svwiki

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

Mentioned in SAL (#wikimedia-operations) [2017-11-16T14:16:44Z] <dcausse@tin> Synchronized wmf-config/InitialiseSettings.php: T177913: [cirrus] Add overridden iw prefix for svwiki (1/2) (duration: 00m 50s)

Mentioned in SAL (#wikimedia-operations) [2017-11-16T14:18:54Z] <dcausse@tin> Synchronized wmf-config/CirrusSearch-common.php: T177913: [cirrus] Add overridden iw prefix for svwiki (2/2) (duration: 00m 48s)