jetpack_search_es_query_args, $es_query_args, $query

jetpack_search_es_query_args, $es_query_args, $query

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: jetpack.16.0.1

apply_filters('jetpack_search_es_query_args, $es_query_args, $query') is found 2 times:

  • /jetpack_vendor/automattic/jetpack-search/src/classic-search/class-classic-search.php line 589
    		 *
    		 * @param array    $es_query_args The raw Elasticsearch query args.
    		 * @param WP_Query $query         The original WP_Query object.
    		 */
    		$es_query_args = apply_filters( 'jetpack_search_es_query_args', $es_query_args, $query );
    
    		// Do the actual search query!
    		$this->search_result = $this->search( $es_query_args );
    
    		if ( is_wp_error( $this->search_result ) || ! is_array( $this->search_result ) || empty( $this->search_result['results'] ) || empty( $this->search_result['results']['hits'] ) ) {
    			$this->found_posts = 0;
    
  • /jetpack_vendor/automattic/jetpack-search/src/inline-search/class-inline-search.php line 428
    			'aggregations' => $api_query_args['aggregations'] ?? array(),
    			'fields'       => $api_query_args['fields'] ?? array(),
    		);
    
    		$es_query_args = apply_filters( 'jetpack_search_es_query_args', $es_query_args, $query );
    
    		if ( ! empty( $es_query_args['aggregations'] ) && is_array( $es_query_args['aggregations'] ) ) {
    			$api_query_args['aggregations'] = $es_query_args['aggregations'];
    		}
    		$api_query_args['filter'] = $es_query_args['filter'] ?? $api_query_args['filter'];
    		$api_query_args['size']   = $es_query_args['size'] ?? $api_query_args['size'];