jenkins-bot has submitted this change and it was merged.
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, 44 insertions(+), 4 deletions(-)
Approvals:
Tjones: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index f6fc63f..b123413 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -113,7 +113,35 @@
function initialize( session ) {
var sessionId = session.get( 'sessionId' ),
- sampleSize = 200,
+ sampleSize = ( function () {
+ var dbName = mw.config.get( 'wgDBname'
),
+ subTests = {
+ zhwiki: {
+ // 1:16 overall
sessions into test
+ test: 16,
+ // 1:13 of test
sessions reserved for dashboard
+ // 12:13
sessions split evenly between test buckets
+ subTest: 13
+ },
+ jawiki: {
+ test: 16,
+ subTest: 13
+ },
+ thwiki: {
+ test: 5,
+ subTest: 39
+ }
+ };
+
+ if ( subTests[ dbName ] ) {
+ return subTests[ dbName ];
+ } else {
+ return {
+ test: 200,
+ subTest: null
+ };
+ }
+ } )(),
/**
* Determines whether the user is part of the
population size.
*
@@ -153,7 +181,7 @@
}
// If a sessionId exists the user was previously
accepted into the test
if ( !sessionId ) {
- if ( !oneIn( sampleSize ) ) {
+ if ( !oneIn( sampleSize.test ) ) {
// user was not chosen in a sampling of
search results
session.set( 'sessionId', 'rejected' );
return;
@@ -162,6 +190,13 @@
// have a search session id, generate one.
if ( !session.set( 'sessionId', randomToken() )
) {
return;
+ }
+
+ if ( sampleSize.subTest !== null && !oneIn(
sampleSize.subTest ) ) {
+ session.set( 'subTest', chooseBucket( [
+ 'bm25:control',
+ 'bm25:inclinks_pv'
+ ] ) );
}
}
@@ -707,8 +742,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: merged
Gerrit-Change-Id: I6f07fd913e8c8a2c41afe0bd02a43cfe13c14533
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Tjones <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits