From 57d042e5d85a978ed7a64acb821b59579c508aeb Mon Sep 17 00:00:00 2001 From: bach Date: Wed, 25 Aug 2021 22:07:16 +0200 Subject: [PATCH] sapi conditiongroup AND instead of OR --- web/modules/custom/materio_sapi/src/Controller/Base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/modules/custom/materio_sapi/src/Controller/Base.php b/web/modules/custom/materio_sapi/src/Controller/Base.php index 4de3e5ae..f016a49e 100644 --- a/web/modules/custom/materio_sapi/src/Controller/Base.php +++ b/web/modules/custom/materio_sapi/src/Controller/Base.php @@ -51,7 +51,7 @@ class Base extends ControllerBase { // - " edismax " => ??? $parse_mode = \Drupal::service('plugin.manager.search_api.parse_mode') ->createInstance('direct'); - $parse_mode->setConjunction('OR'); + $parse_mode->setConjunction('AND'); $this->query->setParseMode($parse_mode); // Set fulltext search keywords and fields. @@ -88,7 +88,7 @@ class Base extends ControllerBase { // filter the search if ($this->filters) { - $filters_conditions = $this->query->createConditionGroup('OR'); + $filters_conditions = $this->query->createConditionGroup('AND'); foreach ($this->filters as $filter) { $filter = (int) $filter; foreach (['tag_tid', 'thesaurus_tid'] as $field) {