WordPress.org

Making WordPress.org

Changeset 4517


Ignore:
Timestamp:
12/13/16 04:10:18 (12 months ago)
Author:
tellyworth
Message:

Plugin directory search: rebalance search weightings a bit.

In particular, drastically lower the effect of partial slug matches, and limit the strength of other signals. This is an incremental improvement that still needs further work.

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

    r4452 r4517  
    286286        $locale = get_locale(); 
    287287        if ( $locale && $locale !== 'en' && $locale !== 'en_US' ) { 
    288             $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^0.25', 'slug', 'contributors' ); 
     288            $es_wp_query_args['query_fields'] = array( "title_{$locale}", 'title_en^0.2', "content_{$locale}", 'content_en^0.2', "excerpt_{$locale}^1.2", 'excerpt_en^0.2', 'author', 'tag', 'category', 'slug_ngram^0.005', 'slug^1.2', 'contributors' ); 
    289289        } else { 
    290             $es_wp_query_args['query_fields'] = array( 'title_en^4', 'content_en', 'excerpt_en', 'author', 'tag', 'category', 'slug_ngram^0.25', 'slug', 'contributors' ); 
     290            $es_wp_query_args['query_fields'] = array( 'title_en', 'content_en', 'excerpt_en^1.2', 'author', 'tag', 'category', 'slug_ngram^0.005', 'slug^1.2', 'contributors' ); 
    291291        } 
    292292 
     
    770770                                'field_value_factor' => array( 
    771771                                    'field' => 'support_threads_resolved', 
    772                                     'factor' => 2, 
     772                                    'factor' => 0.5, 
    773773                                    'modifier' => 'log2p', 
    774774                                    'missing' => 0, 
     
    784784                            ), 
    785785                        ), 
    786                         'boost_mode' => 'multiply' 
     786                        'boost_mode' => 'multiply', 
     787                        'max_boost' => 5, 
    787788                    ) 
    788789                ), 
Note: See TracChangeset for help on using the changeset viewer.