Page MenuHomePhabricator

Special:Search should favor articles in user's language on multi-lingual wikis like mediawiki.org
Closed, DuplicatePublic

Description

On a multilingual wiki like www.mediawiki.org, if you search for a term that's on a page that's been translated into many languages, search results include all those translations.

  • When your language is the same as the wiki's primary language (en), those translated pages are completely useless and clutter search results.
  • When your language is different, translations into your language appear no higher, and the translations into other languages aren't especially useful unless you're more fluent in then than English.

To reproduce, search for "badtoken", and note the search results include API:Errors and warnings/{de,es,ja,ko}, Manual:Edit token/zh, etc.
Now repeat the search with uselang=fr. Note the results set is exactly the same in the same order, it doesn't favor the French translations.

Expected behavior is some mix of:

  • Have a language option in the search form, defaulted to the user's language if known.
  • When a page has translations, favor the "root" page and the translation into the user's language. (This sounds like T68829: Prefer pages in the user's language in multilingual wikis, but it doesn't work!?)
  • Don't show translated pages if the user's language preference is the site's language.
  • Maybe have a UX to filter search results by language after they're presented.

The translated pages all have lang="//langcode" attributes on the outermost <html> tag and on <div id="contentSub" , so CirrusSearch is aware of the language of the pages.

See original user complaint and discussion in Multiple languages in search results topic on https://www.mediawiki.org/wiki/Project:Current_issues.

Event Timeline

Spage raised the priority of this task from to Needs Triage.
Spage updated the task description. (Show Details)
Spage added projects: CirrusSearch, I18n.
Spage added subscribers: Spage, Nemo_bis.
Restricted Application added a project: Discovery. · View Herald TranscriptJul 24 2015, 8:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ironholds moved this task from Needs triage to Search on the Discovery board.Aug 4 2015, 8:17 AM
ksmith set Security to None.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptDec 31 2015, 12:32 AM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptSep 22 2016, 10:27 PM