Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/75507
Change subject: Enable CirrusSearch in beta. ...................................................................... Enable CirrusSearch in beta. Change-Id: Ibf3bb8f14185474de08166073ea90b372aa0ac6a --- A wmf-config/CirrusSearch-common.php A wmf-config/CirrusSearch-labs.php M wmf-config/CommonSettings.php 3 files changed, 62 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/07/75507/1 diff --git a/wmf-config/CirrusSearch-common.php b/wmf-config/CirrusSearch-common.php new file mode 100644 index 0000000..4b1c50b --- /dev/null +++ b/wmf-config/CirrusSearch-common.php @@ -0,0 +1,35 @@ +<?php +# WARNING: This file is publically viewable on the web. Do not put private data here. + +# This file hold the CirrusSearch configuration which is common to all realms, +# ie settings should apply to both the production cluster and the beta +# cluster. +# If you ever want to stick there an IP address, you should use the per realm +# specific files CirrusSearch-labs.php and CirrusSearch-production.php + +# See: https://wikitech.wikimedia.org/wiki/Search +# +# Contact Wikimedia operations or platform engineering for more details. + +require_once( "$IP/extensions/CirrusSearch/CirrusSearch.php" ); +$wgSearchType = 'CirrusSearch'; + +$wgPoolCounterConf['CirrusSearch-Update'] = array( + 'class' => 'PoolCounter_Client', + 'timeout' => 120, // wait timeout in seconds + 'workers' => 20, // maximum number of active threads in each pool + 'maxqueue' => 200, // maximum number of total threads in each pool +); +$wgPoolCounterConf['CirrusSearch-Search'] = array( + 'class' => 'PoolCounter_Client', + 'timeout' => 30, // wait timeout in seconds + 'workers' => 50, // maximum number of active threads in each pool + 'maxqueue' => 10, // maximum number of total threads in each pool +); + + +# Load per realm specific configuration, either: +# - CirrusSearch-labs.php +# - CirrusSearch-production.php +# +require( getRealmSpecificFilename( "$wmfConfigDir/CirrusSearch.php" ) ); diff --git a/wmf-config/CirrusSearch-labs.php b/wmf-config/CirrusSearch-labs.php new file mode 100644 index 0000000..9d1fe56 --- /dev/null +++ b/wmf-config/CirrusSearch-labs.php @@ -0,0 +1,9 @@ +<?php +# WARNING: This file is publically viewable on the web. Do not put private data here. + +# This file holds the MediaWiki CirrusSearch configuration which is specific +# to the 'labs' realm which in most of the cases means the beta cluster. +# It should be loaded AFTER CirrusSearch-common.php + +# default host for mwsuggest backend +$wgCirrusSearchServers = array( 'beta-es0', 'beta-es1', 'beta-es2' ); diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index a3dc9dd..c942110 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -910,17 +910,25 @@ wfProfileOut( "$fname-misc2" ); -# This is overridden in the Lucene section below -$wgDisableTextSearch = true; -$wgDisableSearchUpdate = true; - # :SEARCH: -# Better make sure the global setting is enabled -$wgUseLuceneSearch = true; -if ( $wgUseLuceneSearch ) { - wfProfileIn( "$fname-lucene" ); - include( "$wmfConfigDir/lucene-common.php" ); - wfProfileOut( "$fname-lucene" ); +switch ( $wmfRealm ) { +case 'labs': + wfProfileIn( "$fname-CirrusSearch" ); + include( "$wmfConfigDir/CirrusSearch-common.php" ); + wfProfileOut( "$fname-CirrusSearch" ); +case 'production': +default: + # This is overridden in the Lucene section below + $wgDisableTextSearch = true; + $wgDisableSearchUpdate = true; + + # Better make sure the global setting is enabled + $wgUseLuceneSearch = true; + if ( $wgUseLuceneSearch ) { + wfProfileIn( "$fname-lucene" ); + include( "$wmfConfigDir/lucene-common.php" ); + wfProfileOut( "$fname-lucene" ); + } } // Case-insensitive title prefix search extension -- To view, visit https://gerrit.wikimedia.org/r/75507 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf3bb8f14185474de08166073ea90b372aa0ac6a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Manybubbles <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
