Page MenuHomePhabricator

Advanced search not working as expected with subpages in namespaces
Open, Needs TriagePublic

Description

This search attempts to find the use of word "help" on subpages of User_talk:Huji on enwiki. Note that the word "help" appears several times on https://en.wikipedia.org/wiki/User_talk:Huji/Archive_1 yet the search returns not results.

This search tries the same thing but explicitly uses the subpageof: prefix; this also does not return any results.

Event Timeline

matmarex subscribed.

I found that the trick to making this work is setting the namespace separately in the search options, and then omitting it from the subpage title. I agree that this is unintuitive. These search queries work as expected: using advanced search, using subpageof:.

I would expect the namespace provided in the subpage title to override the search namespace, just like how starting a simple search query with a namespace prefix overrides the default namespace, for example: "signpost", "wikipedia:signpost".

(Looks like a search backend issue, not the search interface, so changing tags.)

matmarex renamed this task from Advanced search not working as expected with subpages to Advanced search not working as expected with subpages in namespaces.Apr 11 2025, 2:23 PM
dcausse subscribed.

Tagging Advanced-Search because we introduced subpageof in CirrusSearch to workaround confusing behaviors of existing keywords like prefix:, see T159321 and T180495. There's possibly something to do on the UI to better guide the user using this field?
Search keywords that can escape the initial namespace filter have been quite confusing as well and we decided to not introduce new ones because there's no way to understand from the CirrusSearch perspective what's the actual intent of the user.

Change #1189591 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/AdvancedSearch@master] Detect and handle namespace prefixes for subpageof values

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

Once this is implemented, it might be easier to reflect an incoming prefix: search as a subpageof: + namespace filter, which could help fix T223694 ?