Changeset 3310 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php
- Timestamp:
- 06/07/2016 10:34:18 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php
r3074 r3310 439 439 440 440 'query' => null, // Search phrase 441 'query_fields' => array( 'title ', 'content', 'author', 'tag', 'category' ),441 'query_fields' => array( 'title^2', 'content', 'author', 'tag', 'category', 'slug_ngram', 'contributors' ), 442 442 443 443 'post_type' => null, // string or an array … … 612 612 } 613 613 614 615 614 return $es_query_args; 616 615 } … … 656 655 657 656 return array( 658 'function_score' => array( 659 'query' => $query, 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 657 'filtered' => array( 658 'query' => array( 659 'function_score' => array( 660 'query' => $query, 661 'functions' => array( 662 array( 663 'gauss'=> array( 664 'date_gmt' => array( 665 'origin' => $date_origin, 666 'scale' => $date_scale, 667 'decay' => $date_decay, 668 ) ), 669 ), 670 array( 671 'field_value_factor' => array( 672 'field' => 'meta.active_installs.long', 673 'factor' => 1.0, 674 'modifier' => 'log1p', 675 ), 676 ), 677 678 ), 679 'boost_mode' => 'multiply' 680 ) 677 681 ), 678 'boost_mode' => 'multiply' 679 ) ); 682 'filter' => array( 683 'exists' => array( 684 'field' => 'meta.active_installs.long' 685 ) 686 ) 687 ) 688 ); 680 689 } 681 690
Note: See TracChangeset
for help on using the changeset viewer.