Page MenuHomePhabricator

Always use /wiki/ for searches, where possible
Closed, InvalidPublic

Description

Author: Wiki.Melancholie

Description:
Currently, searches with #searchform and #bodySearch will result in /wiki/Special:Search

But on [[Special:Search]] itself, #search and #powersearch are using /w/index.php?title=Special%3ASearch

The problem now is (beside those URL escaped characters like %3A), that for Wikimedia wikis the requests done under /w/index.php are not counted within our Squid log stream stats (Wikistats)!

This could easily be fixed by changing
<form id="search" method="get" action="/w/index.php"><input name="title" type="hidden" value="Special:Search" />
to
<form id="search" method="get" action="/wiki/Special:Search">

and
<form id="powersearch" method="get" action="/w/index.php">...<input name="title" type="hidden" value="Special:Search" />
to
<form id="powersearch" method="get" action="/wiki/Special:Search">

This would be more consistent, will remove/shorten ugly %-encodings, reduce code and will improve our stats!


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/w/index.php?title=Special%3ASearch

Details

Reference
bz16147

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:22 PM
bzimport set Reference to bz16147.
bzimport added a subscriber: Unknown Object (MLST).

Wiki.Melancholie wrote:

Not sure whether this should also be done for the "next" and "previous" links, by the way!

Actually, it should be good to not count "one" single search (incl. navigating through next, next, next results) more than once!?
On the other hand we just count *page hits/accesses* and so those links should also access Special:Search under /wiki/...

For consistency reason it should be done anyway, although a bit harder to do; search form are easy to improve.

We'd actually want to do the opposite:

  • bug 16823 -- on many third-party installations, putting parameters on the Special:Search view URL breaks entirely
  • general robots.txt goodness -- spiders are more likely to hit /wiki/Special:Search whatever whereas the index.php URLs will be blocked on more installations (including ours)

Stats should simply be updated to handle the other URLs and catch search terms specifically -- bug 13488.