jenkins-bot has submitted this change and it was merged. Change subject: Add support for ignoring scanned plugins ......................................................................
Add support for ignoring scanned plugins This allows you to ignore a plugin without removing it from Elasticsearch. That is important because removing it requires a rolling restart of Elasticsearch and that takes a while and isn't possible on a wiki by wiki basis. Change-Id: I9902509696192c6da8d669801070a3650e69a1f4 --- M CirrusSearch.php M maintenance/updateOneSearchIndexConfig.php 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/CirrusSearch.php b/CirrusSearch.php index ccff70b..71747c7 100644 --- a/CirrusSearch.php +++ b/CirrusSearch.php @@ -297,6 +297,11 @@ // the index. $wgCirrusSearchRefreshInterval = 1; +// List of plugins that Cirrus should ignore when it scans for plugins. This +// will cause the plugin not to be used by updateSearchIndexConfig.php and +// friends. +$wgCirrusSearchBannedPlugins = array(); + $includes = __DIR__ . "/includes/"; $buildDocument = $includes . 'BuildDocument/'; /** diff --git a/maintenance/updateOneSearchIndexConfig.php b/maintenance/updateOneSearchIndexConfig.php index 98d50fc..60afb73 100644 --- a/maintenance/updateOneSearchIndexConfig.php +++ b/maintenance/updateOneSearchIndexConfig.php @@ -240,6 +240,8 @@ } private function scanAvailablePlugins() { + global $wgCirrusSearchBannedPlugins; + $this->output( $this->indent . "Scanning available plugins..." ); $result = Connection::getClient()->request( '_nodes' ); $result = $result->getData(); @@ -259,6 +261,9 @@ $this->output( 'none' ); } $this->output( "\n" ); + if ( count( $wgCirrusSearchBannedPlugins ) ) { + $this->availablePlugins = array_diff( $this->availablePlugins, $wgCirrusSearchBannedPlugins ); + } foreach ( array_chunk( $this->availablePlugins, 5 ) as $pluginChunk ) { $plugins = implode( ', ', $pluginChunk ); $this->output( $this->indent . "\t$plugins\n" ); -- To view, visit https://gerrit.wikimedia.org/r/133164 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9902509696192c6da8d669801070a3650e69a1f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Manybubbles <never...@wikimedia.org> Gerrit-Reviewer: Chad <ch...@wikimedia.org> Gerrit-Reviewer: Manybubbles <never...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits