Changeset 4434 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php
- Timestamp:
- 11/28/2016 01:29:30 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
r4334 r4434 57 57 protected $found_posts = 0; 58 58 59 protected $search_query; 59 60 protected $search_result; 60 61 … … 134 135 135 136 add_filter( 'jetpack_search_es_wp_query_args', array( $this, 'filter__add_date_filter_to_query' ), 10, 2 ); 137 138 // Debug 139 if ( file_exists( __DIR__ . '/jetpack-search-debug.php' ) ) 140 include_once( __DIR__ . '/jetpack-search-debug.php' ); 136 141 } 137 142 … … 296 301 //Only trust ES to give us IDs, not the content since it is a mirror 297 302 $es_query_args['fields'] = array( 303 'slug', 304 'support_threads_resolved', 305 'support_threads_percentage', 306 'support_resolution_yes', 307 'support_resolution_no', 308 'support_resolution_percentage', 309 'active_installs', 310 'contributors_active_installs', 311 'tested', 312 'meta.rating.double', 298 313 'post_id', 299 314 'blog_id' … … 302 317 // This filter is harder to use if you're unfamiliar with ES but it allows complete control over the query 303 318 $es_query_args = apply_filters( 'jetpack_search_es_query_args', $es_query_args, $query ); 319 $this->search_query = $es_query_args; 304 320 305 321 // Do the actual search query! … … 423 439 } 424 440 441 public function get_search_query() { 442 return $this->search_query; 443 } 425 444 426 445 /////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.