EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/337191 )
Change subject: [WIP] Expose a search profile for popular pages ...................................................................... [WIP] Expose a search profile for popular pages The apps teams are putting out a feature to show popular pages nearby the user. These new profiles weight very heavily towards page popularity in the content namespace, and the incoming links on all other namespaces. Not expecting much usage outside the content namespace though. Bug: T157843 Change-Id: I7fb983fc51c1232e652798600855ba3a4e661eef --- M profiles/RescoreProfiles.config.php 1 file changed, 103 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/91/337191/1 diff --git a/profiles/RescoreProfiles.config.php b/profiles/RescoreProfiles.config.php index 3ffc62e..8a036ec 100644 --- a/profiles/RescoreProfiles.config.php +++ b/profiles/RescoreProfiles.config.php @@ -151,6 +151,59 @@ ], ], ], + + // inclinks + pageviews applied as weighted sum with + // a very high weight on pageviews, for returning the + // most popular matching pages + 'popular_inclinks_pv' => [ + 'supported_namespaces' => 'content', + 'fallback_profile' => 'popular_inclinks', + 'rescore' => [ + [ + 'window' => 8192, + 'window_size_override' => 'CirrusSearchFunctionRescoreWindowSize', + 'query_weight' => 1.0, + 'rescore_query_weight' => 1.0, + 'score_mode' => 'total', + 'type' => 'function_score', + 'function_chain' => 'wsum_inclinks_pv+' + ], + [ + 'window' => 8192, + 'window_size_override' => 'CirrusSearchFunctionRescoreWindowSize', + 'query_weight' => 1.0, + 'rescore_query_weight' => 1.0, + 'score_mode' => 'multiply', + 'type' => 'function_score', + 'function_chain' => 'optional_chain' + ], + ], + ], + + 'popular_inclinks' => [ + 'supported_namespaces' => 'all', + 'rescore' => [ + [ + 'window' => 8192, + 'window_size_override' => 'CirrusSearchFunctionRescoreWindowSize', + 'query_weight' => 1.0, + 'rescore_query_weight' => 100.0, + 'score_mode' => 'total', + 'type' => 'function_score', + 'function_chain' => 'wsum_inclinks' + ], + [ + 'window' => 8192, + 'window_size_override' => 'CirrusSearchFunctionRescoreWindowSize', + 'query_weight' => 1.0, + 'rescore_query_weight' => 1.0, + 'score_mode' => 'multiply', + 'type' => 'function_score', + 'function_chain' => 'optional_chain' + ], + ], + ], + ]; /** @@ -283,4 +336,54 @@ ], ], ], + + // like wsum_inclinks_pv, but heavily weighted towards the popularity score + 'wsum_inclinks_pv+' => [ + 'score_mode' => 'sum', + 'boost_mode' => 'sum', + 'functions' => [ + [ + 'type' => 'satu', + 'weight' => [ + 'value' => 1000, + 'config_override' => 'CirrusSearchPageViewsW', + 'uri_param_override' => 'cirrusPageViewsW', + ], + 'params' => [ + 'field' => 'popularity_score', + 'k' => [ + 'value' => 8E-6, + 'config_override' => 'CirrusSearchPageViewsK', + 'uri_param_override' => 'cirrusPageViewsK', + ], + 'a' => [ + 'value' => 0.8, + 'config_override' => 'CirrusSearchPageViewsA', + 'uri_param_override' => 'cirrusPageViewsA', + ], + ], + ], + [ + 'type' => 'satu', + 'weight' => [ + 'value' => 10, + 'config_override' => 'CirrusSearchIncLinksW', + 'uri_param_override' => 'cirrusIncLinkssW', + ], + 'params' => [ + 'field' => 'incoming_links', + 'k' => [ + 'value' => 30, + 'config_override' => 'CirrusSearchIncLinksK', + 'uri_param_override' => 'cirrusIncLinksK', + ], + 'a' => [ + 'value' => 0.7, + 'config_override' => 'CirrusSearchIncLinksA', + 'uri_param_override' => 'cirrusIncLinksA', + ], + ], + ], + ], + ], ]; -- To view, visit https://gerrit.wikimedia.org/r/337191 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7fb983fc51c1232e652798600855ba3a4e661eef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch 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