'number', ]; if ( $wmgCirrusSearchMLRModel ) { foreach ( $wmgCirrusSearchMLRModel as $name => $mlrModel ) { // LTR Rescore profile $wgCirrusSearchRescoreProfiles[$name] = [ 'i18n_msg' => 'cirrussearch-qi-profile-wsum-inclinks-pv', 'supported_namespaces' => 'content', 'supported_syntax' => [ 'simple_bag_of_words' ], 'fallback_profile' => $wmgCirrusSearchMLRModelFallback, 'rescore' => [ [ 'window' => 8192, 'query_weight' => 1.0, 'rescore_query_weight' => 1.0, 'score_mode' => 'total', 'type' => 'function_score', 'function_chain' => 'wsum_inclinks_pv' ], [ 'window' => 8192, 'query_weight' => 1.0, 'rescore_query_weight' => 1.0, 'score_mode' => 'multiply', 'type' => 'function_score', 'function_chain' => 'optional_chain' ], [ 'window' => $mlrModel['window'] ?? 1024, 'query_weight' => 1.0, 'rescore_query_weight' => 10000.0, 'score_mode' => 'total', 'type' => 'ltr', // assumes mlrModel is a string if not defined 'model' => $mlrModel['model'] ?? $mlrModel, ], ], ]; } } # Load per realm specific configuration, one of: # - CirrusSearch-labs.php # - CirrusSearch-production.php require __DIR__ . "/CirrusSearch-{$wmgRealm}.php";