Page MenuHomePhabricator

[Bug] subpageof should indicate in the search results page that it matched against a redirect
Closed, ResolvedPublic

Description

subpageof will sometimes display results which are not subpages of the page that we limited the search to.

Example search query

As you can see in the screenshot, only the 4th result is actually a subpage of the page we specified.

Screenshot_20180216_144438.png (841×796 px, 82 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Lea_WMDE this is because subpageof also covers redirects e.g.:
Historical archive/Friends of Wikipedia/Websites using Wikipedia articles is a redirect to Wikipedia:Mirrors and forks.

This is a bit misleading since nothing in the search result page indicates that it matched to the redirect. I'd suggest that we reformulate this ticket as:
subpageof should indicate in the search results page that it matched against a redirect.

@dcausse interesting! But why isn't it indicated as usually?
(I'm adding an exemplary mock for where redirects are shown)

Bildschirmfoto 2018-02-22 um 08.33.22.png (428×1 px, 108 KB)

Looking at the query we build and send to elasticsearch, it seems we might need to provide an appropriate query to the highlighter? Some testing should be able to tell.

Ran a quick test. To get the highlighter to return results i needed to add a highlight_query which referenced the text, and i needed to add the .prefix subfields to the per-field highlighter configuration matched_fields. Looks fixable but will need to poke around a bit to see how it should be implemented to do this.

I'm in the process of refactoring all of this to include sane interfaces for keywords to change the highlighting behavior. Unless there's some urgency in fixing this I'd prefer to wait until I'm done with the refactoring.

dcausse renamed this task from [Bug] subpageof results will sometimes display wrong results to [Bug] subpageof should indicate in the search results page that it matched against a redirect.Feb 28 2018, 6:52 PM

Change 538623 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/CirrusSearch@master] Add highlighting support of title and redirects for subpageof

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

dcausse triaged this task as Medium priority.
dcausse moved this task from elastic / cirrus to Current work on the Discovery-Search board.
dcausse moved this task from Incoming to Needs review on the Discovery-Search (Current work) board.

Change 538623 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Add highlighting support of title and redirects for subpageof

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

debt subscribed.

closing, as this will go into production this week, yay!