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, [[ https://www.mediawiki.org/wiki/Special:Search/badtoken | search for "badtoken" ]], and note the search results include API:Errors and warnings/{de,es,ja,ko}, Manual:Edit token/zh, etc.
Now [[ https://www.mediawiki.org/wiki/Special:Search/badtoken?uselang=fr | 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}, 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 [[ https://www.mediawiki.org/wiki/Topic:Rhqbt2kclmwhsbdj | Multiple languages in search results ]] topic on https://www.mediawiki.org/wiki/Project:Current_issues.