Page MenuHomePhabricator

[M] Provide default selected namespace function for MediaSearch namespace filter
Closed, ResolvedPublic

Description

Individuals wikis are set up to search certain namespaces by default via the config variable $wgNamespacesToBeSearchedDefault

Make sure that MediaSearch respects this

Event Timeline

SWakiyama updated the task description. (Show Details)
SWakiyama renamed this task from Provide default selected namespace function for MediaSearch namespace filter to [SPIKE] Provide default selected namespace function for MediaSearch namespace filter.Sep 13 2021, 4:05 PM
SWakiyama updated the task description. (Show Details)
Seddon updated the task description. (Show Details)
Seddon updated the task description. (Show Details)
SWakiyama renamed this task from [SPIKE] Provide default selected namespace function for MediaSearch namespace filter to Provide default selected namespace function for MediaSearch namespace filter.Oct 4 2021, 3:17 PM
CBogen renamed this task from Provide default selected namespace function for MediaSearch namespace filter to [M] Provide default selected namespace function for MediaSearch namespace filter.Oct 20 2021, 4:24 PM

Change 743989 had a related patch set uploaded (by Seddon; author: Seddon):

[mediawiki/extensions/MediaSearch@master] wgNamespacesToBeSearchDefault for custom namespace

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

Ok this has made obvious an issue I wasn't aware of. Normally when you do a search on a wiki it searches a certain set of namespaces by default - e.g. when you do a search via Special:Search on commons it searches in File, Help, Category, Creator, Institution and Main

MediaSearch doesn't do this. In the "categories and pages" tab it searches all non-File namespaces.

In the patch for this ticket when you're in the "Categories and pages" tab you can click "Namespaces" and see a "custom" option containing a list of checkboxes, with all the default-namespaces-for-this-wiki checked

This is still rather different from what happens for Special:Search, and I wonder do we need to do reconsider how the namespaces selector works. @Sneha (and also @mwilliams seeing as you worked on this before) - what do you think?

@Cparle I believe that was done on purpose, I sadly can't remember the reason but I'll try and track it down and we can see if it was a worthy reason :)

@Seddon Can you share a bit more context around why those certain namespaces are the default? Thanks!

@mwilliams default namespaces are set for individual wikis ... don't know the history, but I guess for commons at least the community actively wanted File, Help, Category, Creator, Institution and Main to be searched by default

@mwilliams: so the "default" namespaces prioritises search of more frequented namespaces and deprioritise search of niche, more technical or even overwhelming namespaces that might crowd out results without loosing the ability to search those namespaces altogether.

Following a conversation, for this task as it stands, the option to include files will be kept.

To keep changes to a minimum, there will no additional changes on language or experience however, a separate task will be created to define improvements to the user experience to be considered for the future.

Change 743989 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] wgNamespacesToBeSearchDefault for custom namespace resubmission

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