Page MenuHomePhabricator

make namespaces in search URLs more concise
Open, LowPublicFeature

Description

I recently opened up Special:Search on enwiki, set some things, then clicked search. This was the resulting URL:

https://en.wikipedia.org/w/index.php?search=bundle+-intitle%3Abundle+subpageof%3A%22Articles+for+deletion%22&title=Special:Search&profile=advanced&fulltext=1&advancedSearch-current=%7B%22fields%22%3A%7B%22subpageof%22%3A%22Articles+for+deletion%22%7D%7D&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns118=1&ns119=1&ns710=1&ns711=1&ns828=1&ns829=1&ns2300=1&ns2301=1&ns2302=1&ns2303=1

&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns118=1&ns119=1&ns710=1&ns711=1&ns828=1&ns829=1&ns2300=1&ns2301=1&ns2302=1&ns2303=1 sticks out to my eye as too verbose. There's opportunity for improvement here.

I propose the following improvements:

  • add URL support for...
    • ?ns1=1&ns2=1 should be consolidated into ?ns=1,2
    • There should be a ?ns=all shortcut added for searches that should check every namespace
  • change the default search URLs emitted from Special:Search to use the new format
    • ?ns1=1&ns2=1 should be consolidated into ?ns=1,2
    • Detect when the user has clicked the "All" checkbox or has selected every namespace, and emit ?ns=all instead of ?ns=1,2,3,4,5 etc.
  • keep the old URL format for backwards compatibility I guess

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
bking triaged this task as Low priority.Jul 10 2023, 3:18 PM
bking moved this task from needs triage to Feature Requests on the Discovery-Search board.
Aklapper changed the subtype of this task from "Task" to "Feature Request".Jul 21 2023, 1:57 PM