Page MenuHomePhabricator

search with intitle: and linksto: do not find redirects
Closed, ResolvedPublic

Description

Example https://de.wikipedia.org/w/index.php?title=Gamsknogel&redirect=no is a redirect on WP:de

https://de.wikipedia.org/w/index.php?search=Gamsknogel&title=Spezial:Suche&fulltext=1 finds the redirect and lists the target page (with remark wherefrom redirected) - ok
Searching with intitle: https://de.wikipedia.org/w/index.php?search=intitle:Gamsknogel &title=Spezial:Suche does not provide a match.

Similar, when searching with linksto:, https://de.wikipedia.org/w/index.php?search=linksto:Zwiesel_(Chiemgauer_Alpen)&title=Spezial:Suche&profile=advanced&fulltext=1 does not find the redirection page.

I would expect that both intitle: and linksto: will find redirects as primary matches. With both keywords I would expect the redirect to be listed and not the page it redirects to instead (because this page will neither necessarily contain the name in the title nor will it link to itself)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
thiemowmde added subscribers: Smalyshev, thiemowmde.

As far as I understand the backend switches to a completely different search index the moment you use one of the intitle: or prefix: keywords. This alternative index only contains page titles and nothing else. The request is basically to add the titles of all redirects to this index, and make sure the search results page does make this obvious by presenting redirects the same way as they are represented when no keyword is used. @Smalyshev, do you think this is possible, and how hard would it be to implement this properly?

I think this would definitely be helpful from a UX perspective.

The assumption here is that users can not possibly be aware of all redirects and thus might end up getting no results for a perfectly valid search term.

Condition is that the redirected search results must be explicit, like @thiemowmde said, so it is clear to the users why there's a result that doesn't match the search term like it's currently done.

Screenshot_20170720_182658.png (107×586 px, 11 KB)

intitle is easy with respect to showing redirects (which are a field in each page already), but linksto is harder because it doesn't record that information.

Some usage stats, for all wikis between july 9th and july 15th (inclusive):

keywordusages
intitle617,456
linksto2,928
debt subscribed.

Based on the stats, it looks like an easy win would be for us to add the redirects to intitle, since that's used significantly more than linksto.

Let's go ahead and do intitle since it seems a fairly easy thing to do; then we'll see where we are with other work that needs to get done this quarter.

Change 366766 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/extensions/CirrusSearch@master] Match redirects with the intitle keyword

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

Change 366766 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Match redirects with the intitle keyword

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

intitle has been fixed with this ticket; linksto has not. If linksto is still needed, please know that it'll be a chunk of work to do and we will need a different ticket for that work in order to be prioritized.