Making WordPress.org

Changeset 4443


Ignore:
Timestamp:
11/29/2016 04:29:41 AM (8 years ago)
Author:
tellyworth
Message:

Plugin directory: try to balance the search scoring a little better.

See #1692

File:
1 edited

Legend:

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

    r4439 r4443  
    287287        $locale = get_locale();
    288288        if ( $locale && $locale !== 'en' && $locale !== 'en_US' ) {
    289             $es_wp_query_args['query_fields'] = array( "title_{$locale}^4", 'title_en^0.5', "content_{$locale}^2", 'content_en^0.5', "excerpt_{$locale}", 'excerpt_en', 'author', 'tag', 'category', 'slug_ngram', 'contributors' );
     289            $es_wp_query_args['query_fields'] = array( "title_{$locale}^4", 'title_en^0.5', "content_{$locale}", 'content_en^0.5', "excerpt_{$locale}", 'excerpt_en', 'author', 'tag', 'category', 'slug_ngram^4', 'contributors' );
    290290        } else {
    291             $es_wp_query_args['query_fields'] = array( 'title_en^4', 'content_en^2', 'excerpt_en', 'author', 'tag', 'category', 'slug_ngram', 'contributors' );
     291            $es_wp_query_args['query_fields'] = array( 'title_en^4', 'content_en', 'excerpt_en', 'author', 'tag', 'category', 'slug_ngram^4', 'contributors' );
    292292        }
    293293
     
    764764                                'field_value_factor' => array(
    765765                                    'field' => 'active_installs',
    766                                     'factor' => 1,
     766                                    'factor' => 0.5,
    767767                                    'modifier' => 'log2p',
    768768                                    'missing' => 1,
Note: See TracChangeset for help on using the changeset viewer.