Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/223658
Change subject: Suppress interwiki results when they would break ...................................................................... Suppress interwiki results when they would break Sometimes we end up with a SearchResults object that can't handle interwiki results and it just isn't fair to try to feed them to it. It makes fatals. There is another fix for this issue, but its more complex and as of yet doesn't pass all the tests. But this is a simpler, more obvious fix we can can use as a stopgap. Bug: T104189 Change-Id: Id46545dd77a00ccd4ba2f18efc5d7d57f2d96626 --- M includes/CirrusSearch.php M tests/jenkins/Jenkins.php 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/58/223658/1 diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php index d3b977f..5f183ae 100644 --- a/includes/CirrusSearch.php +++ b/includes/CirrusSearch.php @@ -150,7 +150,8 @@ // Add interwiki results, if we have a sane result // Note that we have no way of sending warning back to the user. In this case all warnings // are logged when they are added to the status object so we just ignore them here.... - if ( $status->isOK() && $wgCirrusSearchInterwikiSources && $status->getValue() ) { + if ( $status->isOK() && $wgCirrusSearchInterwikiSources && $status->getValue() && + method_exists( $status->getValue(), 'addInterwikiResults' ) ) { // @todo @fixme: This should absolutely be a multisearch. I knew this when I // wrote the code but Searcher needs some refactoring first. foreach ( $wgCirrusSearchInterwikiSources as $interwiki => $index ) { diff --git a/tests/jenkins/Jenkins.php b/tests/jenkins/Jenkins.php index dde48f6..12834fe 100644 --- a/tests/jenkins/Jenkins.php +++ b/tests/jenkins/Jenkins.php @@ -79,6 +79,7 @@ $wgCirrusSearchLanguageWeight[ 'user' ] = 10.0; $wgCirrusSearchLanguageWeight[ 'wiki' ] = 5.0; $wgCirrusSearchAllowLeadingWildcard = false; +// $wgCirrusSearchInterwikiSources[ 'c' ] = 'commonswiki'; // Test only API action to expose freezing/thawing writes to the elasticsearch cluster $wgAPIModules['cirrus-freeze-writes'] = 'CirrusSearch\Api\FreezeWritesToCluster'; -- To view, visit https://gerrit.wikimedia.org/r/223658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id46545dd77a00ccd4ba2f18efc5d7d57f2d96626 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles <never...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits