Page MenuHomePhabricator

"insource" search can fatal: RuntimeException from line 402 of CirrusSearch/includes/Search/ResultsType.php
Open, Needs TriagePublic

Description

If I insert insource:/gender/i in top-right search bar on any translatewiki page (except Main Page) e. g. https://translatewiki.net/wiki/Project:News and hit ENTER, i get this error message:

[3b8b3ab4f3f47544ea7858c9] /w/i.php?title=Special%3ASearch&search=insource%3A%2Fgender%2Fi&go=Vai RuntimeException from line 402 of /srv/mediawiki/tags/2016-07-09_13:33:21/extensions/CirrusSearch/includes/Search/ResultsType.php: regex is only supported with $wgCirrusSearchUseExperimentalHighlighter = true
Backtrace:
#0 /srv/mediawiki/tags/2016-07-09_13:33:21/extensions/CirrusSearch/includes/Searcher.php(1160): CirrusSearch\Search\FullTextResultsType->getHighlightingConfiguration(array)
#1 /srv/mediawiki/tags/2016-07-09_13:33:21/extensions/CirrusSearch/includes/Searcher.php(795): CirrusSearch\Searcher->search(string, string)
#2 /srv/mediawiki/tags/2016-07-09_13:33:21/extensions/CirrusSearch/includes/CirrusSearch.php(403): CirrusSearch\Searcher->searchText(string, boolean)
#3 /srv/mediawiki/tags/2016-07-09_13:33:21/extensions/CirrusSearch/includes/CirrusSearch.php(147): CirrusSearch->searchTextReal(string, NULL)
#4 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/specials/SpecialSearch.php(288): CirrusSearch->searchText(string)
#5 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/specials/SpecialSearch.php(232): SpecialSearch->showResults(string)
#6 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/specials/SpecialSearch.php(142): SpecialSearch->goResult(string)
#7 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/specialpage/SpecialPage.php(505): SpecialSearch->execute(NULL)
#8 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/specialpage/SpecialPageFactory.php(598): SpecialPage->run(NULL)
#9 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/MediaWiki.php(282): SpecialPageFactory::executePath(Title, RequestContext)
#10 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/MediaWiki.php(748): MediaWiki->performRequest()
#11 /srv/mediawiki/tags/2016-07-09_13:33:21/includes/MediaWiki.php(520): MediaWiki->main()
#12 /srv/mediawiki/tags/2016-07-09_13:33:21/index.php(43): MediaWiki->run()
#13 {main}

eMRB.png (741×1 px, 209 KB)


URL: https://translatewiki.net/w/i.php?title=Special%3ASearch&search=insource%3A%2Fgender%2Fi&go=Vai

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
debt added a subscriber: debt.

It looks like there are a few things not turned on, but not something that Discovery will need to fix.

It looks like from the error message translatewiki.net doesn't have the experimental highlighting feature enabled.

$wgCirrusSearchUseExperimentalHighlighter = true;

Check out: https://phabricator.wikimedia.org/diffusion/ECIR/browse/master/CirrusSearch.php for more information.

Nemo_bis renamed this task from Insource doesn't work on translatewiki to "insource" search can fatal: RuntimeException from line 402 of CirrusSearch/includes/Search/ResultsType.php.Jul 16 2016, 8:14 AM
Nemo_bis edited projects, added CirrusSearch; removed translatewiki.net.
Nemo_bis updated the task description. (Show Details)
Nemo_bis added a subscriber: Nemo_bis.

Not a TWN issue; we don't need this feature thanks to https://translatewiki.net/wiki/Special:SearchTranslations , the bug is the fatal.

I do have a need to use insource now for non-translations.

Nothings should throw exceptions unless there is a mistake. Not enabling anything called experimental should not be a mistake. Please fix.

Translatewiki.net now uses $wgCirrusSearchUseExperimentalHighlighter = true;.