Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Weighting: Add ability to bail early from do_weighting" #2860

Merged
merged 1 commit into from
Jun 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions includes/classes/Feature/Search/Weighting.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,21 +589,6 @@ public function do_weighting( $formatted_args, $args ) {
*/
$weight_config = apply_filters( 'ep_weighting_configuration_for_search', $weight_config, $args );

/**
* Filter whether to disable weighting configuration
*
* @hook ep_disable_do_weighting
* @since 4.2.1
* @param {bool} Whether to use weighting configuration, default is false
* @param {array} $weight_config Current weight config
* @param {array} $args WP Query arguments
* @param {array} $formatted_args Formatted ES arguments
* @return {bool} Whether to use weighting configuration
*/
if ( apply_filters( 'ep_disable_do_weighting', false, $weight_config, $args, $formatted_args ) ) {
return $formatted_args;
}

if ( Utils\is_integrated_request( 'weighting', [ 'public', 'rest' ] ) && ! empty( $args['s'] ) ) {
/*
* This section splits up the single query clause for all post types into separate nested clauses (one for each post type)
Expand Down