Making WordPress.org


Ignore:
Timestamp:
05/04/2016 03:32:53 AM (10 years ago)
Author:
tellyworth
Message:

Search: incorporate comment_count into score, as a proxy for popularity.

This should probably include the active install count as well, and perhaps some other factors.

See #1574

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php

    r3073 r3074  
    658658                         'function_score' => array(
    659659                                 'query' => $query,
    660                                  'gauss'=> array(
    661                                          'date_gmt' => array(
    662                                                  'origin' => $date_origin,
    663                                                  'scale' => $date_scale,
    664                                                  'decay' => $date_decay
    665                                  ) ),
     660                                 'functions' => array(
     661                                         array(
     662                                                 'gauss'=> array(
     663                                                         'date_gmt' => array(
     664                                                                 'origin' => $date_origin,
     665                                                                 'scale' => $date_scale,
     666                                                                 'decay' => $date_decay,
     667                                                         ) ),
     668                                         ),
     669                                        array(
     670                                                'field_value_factor' => array(
     671                                                        'field' => 'comment_count',
     672                                                        'factor' => 1.0,
     673                                                        'modifier' => 'log1p',
     674                                                ),
     675                                        ),
     676
     677                                 ),
    666678                                 'boost_mode' => 'multiply'
    667679                ) );
Note: See TracChangeset for help on using the changeset viewer.