jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/337191 )

Change subject: Expose a search profile for popular pages
......................................................................


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 i18n/en.json
M i18n/qqq.json
M profiles/RescoreProfiles.config.php
3 files changed, 109 insertions(+), 0 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  DCausse: Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index ffa7d02..0de1a50 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -36,6 +36,8 @@
        "cirrussearch-qi-profile-classic": "Ranking based on the number of 
incoming links, some templates, article language and recency 
(templates/language/recency may not be activated on this wiki).",
        "cirrussearch-qi-profile-classic-noboostlinks": "Ranking based on some 
templates, article language and recency when activated on this wiki.",
        "cirrussearch-qi-profile-empty": "Ranking based solely on query 
dependent features (for debug only).",
+       "cirrussearch-qi-profile-popular-pv": "Ranking based primarily on page 
views",
+       "cirrussearch-qi-profile-popular-inclinks": "Ranking based primarily on 
incoming link counts",
        "cirrussearch-pref-completion-profile-help": "Set the behavior for 
autocomplete (search-as-you-type) suggestions.",
        "prefs-completion": "Search completion",
        "cirrussearch-pref-completion-section-desc": "Completion suggester",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index dd7af78..343300d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -45,6 +45,8 @@
        "cirrussearch-qi-profile-classic": "Classic query independent search 
profile (affects fulltext search ranking algorithm).",
        "cirrussearch-qi-profile-classic-noboostlinks": "Classic query 
independent search profile without boost links (affects fulltext search ranking 
algorithm).",
        "cirrussearch-qi-profile-empty": "Empty query independent search 
profile (affects fulltext search ranking algorithm).",
+       "cirrussearch-qi-profile-popular-pv": "Page view based query 
independent search profile (affects fulltext search ranking algorithm).",
+       "cirrussearch-qi-profile-popular-inclinks": "Incoming link count based 
query independent search profile (affects fulltext search ranking algorithm).",
        "cirrussearch-pref-completion-profile-help": "Help message for 
completion profile settings in the user preferences.",
        "prefs-completion": "Section name for completion settings in the user 
preferences.",
        "cirrussearch-pref-completion-section-desc": "Name of the subsection 
Completion Suggester in the user preferences.",
diff --git a/profiles/RescoreProfiles.config.php 
b/profiles/RescoreProfiles.config.php
index 3ffc62e..37aea66 100644
--- a/profiles/RescoreProfiles.config.php
+++ b/profiles/RescoreProfiles.config.php
@@ -151,6 +151,61 @@
                        ],
                ],
        ],
+
+       // 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',
+               'i18n_msg' => 'cirrussearch-qi-profile-popular-pv',
+               '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',
+               'i18n_msg' => 'cirrussearch-qi-profile-popular-inclinks',
+               '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 +338,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: merged
Gerrit-Change-Id: I7fb983fc51c1232e652798600855ba3a4e661eef
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to