Deprecate hook_search_api_solr_converted_query_alter, use PostConvertedQueryEvent instead.

This commit is contained in:
Rosie Le Faive 2023-09-26 13:11:15 -03:00
parent f60b4f28e6
commit 346478be30

View file

@ -51,19 +51,6 @@ function advanced_search_library_info_alter(&$libraries, $extension) {
} }
} }
/**
* Implements hook_search_api_solr_converted_query_alter().
*/
function advanced_search_search_api_solr_converted_query_alter(SolariumQueryInterface $solarium_query, DrupalQueryInterface $search_api_query) {
// We must modify the query itself rather than the representation the
// search_api presents as it is not possible to use the 'OR' operator
// with it as it converts conditions into separate filter queries.
// Additionally filter queries do not affect the score so are not
// suitable for use in the advanced search queries.
$advanced_search_query = new AdvancedSearchQuery();
$advanced_search_query->alterQuery(\Drupal::request(), $solarium_query, $search_api_query);
}
/** /**
* Implements hook_form_form_id_alter(). * Implements hook_form_form_id_alter().
*/ */