EBernhardson has uploaded a new change for review.

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

Change subject: Turn on CirrusSearch bm25 A/B test for ja, zh and th
......................................................................

Turn on CirrusSearch bm25 A/B test for ja, zh and th

Second run of the CirrusSearch bm25 A/B test. This time on languages
that do not use spaces as word separators.

Bug: T147495
Change-Id: I6f07fd913e8c8a2c41afe0bd02a43cfe13c14533
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 23 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/94/316494/1

diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index f6fc63f..5c13802 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -113,7 +113,8 @@
                function initialize( session ) {
 
                        var sessionId = session.get( 'sessionId' ),
-                               sampleSize = 200,
+                               haveSubTest = [ 'zhwiki', 'thwiki', 'jawiki' 
].indexOf( mw.config.get( 'wgDBname' ) ) >= 0,
+                               sampleSize = haveSubTest ? 16 : 200,
                                /**
                                 * Determines whether the user is part of the 
population size.
                                 *
@@ -162,6 +163,20 @@
                                // have a search session id, generate one.
                                if ( !session.set( 'sessionId', randomToken() ) 
) {
                                        return;
+                               }
+
+                               // 12 out of 13 users chosen to participate in 
the test will be
+                               // assigned to a sub test.
+                               // rough math:
+                               //  ~260k sessions/wk
+                               //  16.25k sessions in test (1:16)
+                               //  15k sessions split between buckets (1:13)
+                               //  7.5k sessions/bucket/wk
+                               if ( haveSubTest && !oneIn( 13 ) ) {
+                                       session.set( 'subTest', chooseBucket( [
+                                               'bm25:control',
+                                               'bm25:inclinks_pv'
+                                       ] ) );
                                }
                        }
 
@@ -707,8 +722,13 @@
        // text setup, so wrap in atMostOnce to ensure it's
        // only run once.
        initSubTest = atMostOnce( function ( session ) {
-               // jshint unused:false
-               // no sub test currently running
+               if ( session.get( 'subTest' ) ) {
+                       $( '<input>' ).attr( {
+                               type: 'hidden',
+                               name: 'cirrusUserTesting',
+                               value: session.get( 'subTest' )
+                       } ).prependTo( $( 'input[type=search]' ).closest( 
'form' ) );
+               }
        } );
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f07fd913e8c8a2c41afe0bd02a43cfe13c14533
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
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