From c07f09082b5fe8ad053c06bed79d776397303748 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Tue, 26 Sep 2023 14:04:02 -0300 Subject: [PATCH] Replace comment. --- src/EventSubscriber/PostConvertedQueryEventSubscriber.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/EventSubscriber/PostConvertedQueryEventSubscriber.php b/src/EventSubscriber/PostConvertedQueryEventSubscriber.php index afff4a1..2781c69 100644 --- a/src/EventSubscriber/PostConvertedQueryEventSubscriber.php +++ b/src/EventSubscriber/PostConvertedQueryEventSubscriber.php @@ -30,6 +30,12 @@ class PostConvertedQueryEventSubscriber implements EventSubscriberInterface { public function alter(PostConvertedQueryEvent $event) { $search_api_query = $event->getSearchApiQuery(); $solarium_query = $event->getSolariumQuery(); + + // 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); }