EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/288546

Change subject: Revert "Revert "A/B/C test of control vs textcat vs accept-lang 
+ textcat""
......................................................................

Revert "Revert "A/B/C test of control vs textcat vs accept-lang + textcat""

Re-deploys the configuration for textcat A/B/C test. Had to be reverted because 
not all wiki's had rolled forward to 1.28.0-wmf.1 and the sampleRate => 0 
causes division by zero errors on the older code.

This reverts commit 87af2121a875afde4575067a4262d44b4bbd02ce.

Change-Id: I5292deb70c9239ece62b2ad477794f0f67f1c7fa
---
M tests/cirrusTest.php
M wmf-config/CirrusSearch-common.php
M wmf-config/InitialiseSettings.php
3 files changed, 52 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/46/288546/1

diff --git a/tests/cirrusTest.php b/tests/cirrusTest.php
index 87e3763..820d868 100644
--- a/tests/cirrusTest.php
+++ b/tests/cirrusTest.php
@@ -111,6 +111,8 @@
                );
                $wmfDatacenter = 'unittest';
                $wgCirrusSearchPoolCounterKey = 
'unittest:poolcounter:blahblahblah';
+               // not used for anything, just to prevent undefined variable
+               $IP = '/dev/null';
 
                require "{$wmfConfigDir}/CirrusSearch-common.php";
 
diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index 596dace..492f058 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -131,6 +131,8 @@
 $wgCirrusSearchWikiToNameMap = $wmgCirrusSearchWikiToNameMap;
 $wgCirrusSearchLanguageToWikiMap = $wmgCirrusSearchLanguageToWikiMap;
 
+$wgCirrusSearchTextcatModel = "$IP/vendor/wikimedia/textcat/LM-query";
+
 $wgHooks['CirrusSearchMappingConfig'][] = function( array &$config, 
$mappingConfigBuilder ) {
        $config['page']['properties']['popularity_score'] = array(
                'type' => 'double',
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 16985fd..b4deb1a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16382,9 +16382,57 @@
        'default' => false,
 ],
 
+
 'wmgCirrusSearchUserTesting' => [
        'default' => [
        ],
+       'enwiki' => [
+               'textcat1' => [
+                       // Test only activated via query string trigger
+                       'sampleRate' => 0,
+                       // variables applied to all buckets
+                       'globals' => [
+                               'wgCirrusSearchInterwikiThreshold' => 3,
+                               'wgCirrusSearchLanguageDetectors' => [
+                                       'textcat' => 
'CirrusSearch\\LanguageDetector\\TextCat',
+                               ],
+                               'wgCirrusSearchTextcatLanguages' => [
+                                       'en', 'es', 'zh', 'pt', 'ar', 'ru', 
'fa', 'ko',
+                                       'bn', 'bg', 'hi', 'el', 'ja', 'ta', 
'th', 'he'
+                               ]
+                       ],
+                       'buckets' => [
+                               // control bucket. setup threshold and detector 
but don't turn on the
+                               // language query
+                               'a' => [
+                                       'trigger' => 'textcat1:a',
+                                       'globals' => [
+                                               
'wgCirrusSearchEnableAltLanguage' => false,
+                                       ],
+                               ],
+                               // test bucket. try textcat and append results 
when < 3 results found
+                               'b' => [
+                                       'trigger' => 'textcat1:b',
+                                       'globals' => [
+                                               
'wgCirrusSearchEnableAltLanguage' => true,
+                                               'wgCirrusSearchInterwikiProv' 
=> 'iwsw6',
+                                       ],
+                               ],
+                               // test bucket. try accept-language, fallback 
to textcat
+                               'c' => [
+                                       'trigger' => 'textcat1:c',
+                                       'globals' => [
+                                               
'wgCirrusSearchEnableAltLanguage' => true,
+                                               'wgCirrusSearchInterwikiProv' 
=> 'iwsw7',
+                                               
'wgCirrusSearchLanguageDetectors' => [
+                                                       'accept-lang' => 
'CirrusSearch\\LanguageDetector\\HttpAccept',
+                                                       'textcat' => 
'CirrusSearch\\LanguageDetector\\TextCat',
+                                               ],
+                                       ],
+                               ],
+                       ],
+               ],
+       ],
 ],
 
 // Enable interwiki search by language detection. The list of language

-- 
To view, visit https://gerrit.wikimedia.org/r/288546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5292deb70c9239ece62b2ad477794f0f67f1c7fa
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to