Page MenuHomePhabricator

Integrate MediaSearch backend into Visual Editor
Open, Needs TriagePublic

Description

VE's API request for retrieving files from Commons is already with the right set of parameters that will invoke media search once it becomes a default profile.

We could slightly enhance it (if desirable) by passing along a language, which would help us inform which entities to include (or exclude, because they're likely irrelevant/undesirable in that language). This could be either:

  • the wiki's content language
  • the user's interface language

I suggest the interface language, because:

  • that's the principle we use on Commons as well
  • that can be changed by the user should they need to tweak things to find a better image (they can't change the default wiki language)

Event Timeline

CBogen created this task.Aug 7 2020, 3:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 7 2020, 3:22 PM

AFAICT, VisualEditor already performs the perfect API call that will receive mediasearch results once the new profile is activated by default (so: blocked on T262271)
Work for this ticket will likely be a simple verification.

@matthiasmullie does that mean that when we complete T262271 that Visual Editor will automatically switch to using MediaSearch? What about default Commons search?

Yes for VE.

Default Commons search: yes, under certain conditions (=only searching NS_FILE namespace), which are not the default conditions (other namespaces are also selected by default).
So barely any "default search" sessions will likely use mediasearch profile.

That's very good to know, thanks! I'm going to add the ReleaseCandidate milestone to T262271 and put a note that we should make sure we're confident before we go ahead and merge that one.

@matthiasmullie will this affect file namespace searches on the wikipedias?

@matthiasmullie will this affect file namespace searches on the wikipedias?

No. While it uses the same search index, it doesn't use the Commons-specific media search profile. Wikipedia's file search results will not change.

Change 631394 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/core@master] Search files in user language

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

matthiasmullie updated the task description. (Show Details)