Demon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/78083
Change subject: Redo search configuration
......................................................................
Redo search configuration
Allows us to enable CirrusSearch on a per-wiki basis rather than
realm-wide. Also adds new testsearch100n hosts for production and
adds LuceneSearch to $wgSearchTypeAlternatives for production
wikis (requires I96a08c64 from core)
Change-Id: I8b8931aace3ce7ed50a41c76405a3d800137c97d
---
A wmf-config/CirrusSearch-production.php
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
4 files changed, 35 insertions(+), 17 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/83/78083/1
diff --git a/wmf-config/CirrusSearch-production.php
b/wmf-config/CirrusSearch-production.php
new file mode 100644
index 0000000..1369521
--- /dev/null
+++ b/wmf-config/CirrusSearch-production.php
@@ -0,0 +1,14 @@
+<?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 'production' realm.
+# It should be loaded AFTER CirrusSearch-common.php
+
+$wgCirrusSearchServers = array(
+ '10.64.32.138', # testsearch1001
+ '10.64.32.137', # testsearch1002
+ '10.64.32.136', # testsearch1003
+);
+
+$wgSearchTypeAlternatives = array( 'LuceneSearch' );
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 687193b..3df786d 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -871,26 +871,22 @@
wfProfileOut( "$fname-misc2" );
# :SEARCH:
-switch ( $wmfRealm ) {
-case 'labs':
+# 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" );
+}
+# New wikis are special and get Cirrus :)
+if ( $wmgUseCirrus ) {
wfProfileIn( "$fname-CirrusSearch" );
include( "$wmfConfigDir/CirrusSearch-common.php" );
wfProfileOut( "$fname-CirrusSearch" );
- break;
-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" );
- }
- break;
}
// Case-insensitive title prefix search extension
diff --git a/wmf-config/InitialiseSettings-labs.php
b/wmf-config/InitialiseSettings-labs.php
index ae1e062..3790091 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -274,6 +274,10 @@
'default' => false,
'loginwiki' => true,
),
+
+ 'wmgUseCirrus' => array(
+ 'default' => true,
+ ),
);
} # wmflLabsSettings()
diff --git a/wmf-config/InitialiseSettings.php
b/wmf-config/InitialiseSettings.php
index cf699ec..12d1281 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12423,6 +12423,10 @@
'default' => true,
),
+'wmgUseCirrus' => array(
+ 'default' => false,
+),
+
### End (roughly) of general extensions ########################
// Apply blocks to IPs in XFF (bug 23343)
--
To view, visit https://gerrit.wikimedia.org/r/78083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b8931aace3ce7ed50a41c76405a3d800137c97d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Demon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits