Last modified: 2014-10-15 12:02:03 UTC
The information search-redirect shows a wrong namespace in the search result. Part of the HTML: <a href="/wiki/Hilfe:Weiterleitung" title="Hilfe:Weiterleitung">Hilfe:Weiterleitung</a> <span class='searchalttitle'>(redirect <a href="/wiki/Wikipedia:Falschschreibung" title="Wikipedia:Falschschreibung">Hilfe:<span class='searchmatch'>Falschschreibung</span></a>)</span> * Wikipedia:Falschschreibung - the redirect * Hilfe:Weiterleitung - the target of the redirect * Hilfe:<span class='searchmatch'>Falschschreibung</span> - the shown text, it has the wrong namespace at the begin (It should "Wikipedia:", not "Hilfe:"). I am not sure, if this a bug of the core or Lucene Search. Feel free, to move it to the right place. Thanks.
Changing to MWSearch, because it looks like the Extension is building that text
Can you provide links where this is broken? Preferably a link where it's fixed in Cirrus ;-)
Use the url in the url field and you will still see the error Hilfe:Weiterleitung (redirect Hilfe:Falschschreibung) But the link behind 'Hilfe:Falschschreibung' is 'Wikipedia:Falschschreibung', so the text should also have the 'Wikipedia' in it. Cirrus prefers the section over the redirect: * https://de.wikipedia.org/w/index.php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&uselang=en&srbackend=CirrusSearch * https://de.wikipedia.org/w/index.php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&uselang=en&srbackend=LuceneSearch
(In reply to Umherirrender from comment #3) > Use the url in the url field and you will still see the error > I missed that, apologies > Hilfe:Weiterleitung (redirect Hilfe:Falschschreibung) > > But the link behind 'Hilfe:Falschschreibung' is > 'Wikipedia:Falschschreibung', so the text should also have the 'Wikipedia' > in it. > > Cirrus prefers the section over the redirect: > * > https://de.wikipedia.org/w/index. > php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&u > selang=en&srbackend=CirrusSearch > > * > https://de.wikipedia.org/w/index. > php?title=Spezial%3ASuche&search=hilfe%3AFalschschreibung&fulltext=Volltext&u > selang=en&srbackend=LuceneSearch Ok, I definitely see it here. I wonder if our behavior in Cirrus is the right thing though :)
*** Bug 24026 has been marked as a duplicate of this bug. ***
I think pretty sure the bug lies in this line: https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMWSearch.git/b327da0f987979b3be1e6c9d9d1c53e4197200b2/MWSearch_body.php#L211 The parameter $nsText seems to be referring in this context to the target ns, not to the redirect ns. But the real redirect ns is extracted later[1] for the title-object/linker as result of this call, but the erroneous snipped (displayed text) is already generated. I'm feeling myself uncomfortable to fix this though as I'm not really understanding the whole code and unable to test it. [1] https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMWSearch.git/b327da0f987979b3be1e6c9d9d1c53e4197200b2/MWSearch_body.php#L220