WordPress.org

Making WordPress.org

Changeset 4519


Ignore:
Timestamp:
12/13/16 04:46:39 (12 months ago)
Author:
tellyworth
Message:

Plugin directory search: title needs a little more weight for some exact matches.

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

    r4517 r4519  
    286286        $locale = get_locale(); 
    287287        if ( $locale && $locale !== 'en' && $locale !== 'en_US' ) { 
    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' ); 
     288            $es_wp_query_args['query_fields'] = array( "title_{$locale}^1.2", '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', 'content_en', 'excerpt_en^1.2', 'author', 'tag', 'category', 'slug_ngram^0.005', 'slug^1.2', 'contributors' ); 
     290            $es_wp_query_args['query_fields'] = array( 'title_en^1.2', 'content_en', 'excerpt_en^1.2', 'author', 'tag', 'category', 'slug_ngram^0.005', 'slug^1.2', 'contributors' ); 
    291291        } 
    292292 
Note: See TracChangeset for help on using the changeset viewer.