subpageof will sometimes display results which are not subpages of the page that we limited the search to.
As you can see in the screenshot, only the 4th result is actually a subpage of the page we specified.
Charlie_WMDE | |
Feb 16 2018, 2:00 PM |
F13944855: Bildschirmfoto 2018-02-22 um 08.33.22.png | |
Feb 22 2018, 7:34 AM |
F13797551: Screenshot_20180216_144438.png | |
Feb 16 2018, 2:00 PM |
subpageof will sometimes display results which are not subpages of the page that we limited the search to.
As you can see in the screenshot, only the 4th result is actually a subpage of the page we specified.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add highlighting support of title and redirects for subpageof | mediawiki/extensions/CirrusSearch | master | +240 -1 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | dcausse | T187548 [Bug] subpageof should indicate in the search results page that it matched against a redirect | |||
Resolved | dcausse | T190130 HighlightBuilder: Introduce a way to control the highlighting behaviors | |||
Resolved | dcausse | T228626 Extract interfaces and base classes from SearchResultSet and SearchResult |
@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.
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
Change 538623 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Add highlighting support of title and redirects for subpageof