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.

Event Timeline

Restricted Application added a project: archived--TCB-Team. · View Herald TranscriptFeb 16 2018, 2:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@dcausse do you have an idea what may cause this?

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptFeb 20 2018, 11:11 AM

@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)

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
EBjune moved this task from needs triage to Up Next on the Discovery-Search board.Mar 1 2018, 6:23 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 claimed this task.Sep 23 2019, 2:15 PM
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 closed this task as Resolved.Sep 30 2019, 4:25 PM
debt added a subscriber: debt.

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