diff --git a/tests/features/joinup_search/search.feature b/tests/features/joinup_search/search.feature index 4efa2b84fa..a3994a11a4 100644 --- a/tests/features/joinup_search/search.feature +++ b/tests/features/joinup_search/search.feature @@ -199,17 +199,17 @@ Feature: Global search | title | Bird outposts in the wild | | description | Exotic wings and where to find them. | | state | validated | - And collection: - | title | Ornithology: the study of birds | - | description | Ornithology is a branch of zoology. | - | state | validated | - | affiliates | Bird outposts in the wild | + And collections: + | title | description | state | affiliates | + | Ornithology: the study of birds | Ornithology is a branch of zoology. | validated | Bird outposts in the wild | + | Husky Flying Xylophone | A strange instrument. | validated | | And custom_page content: | title | body | collection | | Disturbed birds | Flocks of trained pigeons flying off. | Ornithology: the study of birds | And news content: - | title | body | collection | state | - | Chickens are small birds | Domesticated in India. | Ornithology: the study of birds | validated | + | title | body | collection | state | + | Chickens are small birds | Birds domesticated in India. | Ornithology: the study of birds | validated | + | Found a xylophone from 1600 in Asia | Oldest instrument of this type. | Husky Flying Xylophone | validated | And event content: | title | body | collection | state | | Bird spotting | Roosters crow at dawn. | Ornithology: the study of birds | validated | diff --git a/web/modules/custom/joinup_search/joinup_search.module b/web/modules/custom/joinup_search/joinup_search.module index 20db62d750..314af525ea 100644 --- a/web/modules/custom/joinup_search/joinup_search.module +++ b/web/modules/custom/joinup_search/joinup_search.module @@ -165,12 +165,15 @@ function joinup_search_search_api_solr_field_mapping_alter(IndexInterface $index * Implements hook_search_api_solr_query_alter(). */ function joinup_search_search_api_solr_query_alter(SolariumQueryInterface $solarium_query, QueryInterface $query): void { - if ( - !$solarium_query instanceof Query - ) { + if (!$solarium_query instanceof Query) { return; } + // Keep the edismax parser to allow document boosting to work properly. + // @todo remove when document boosting is reimplemented by search_api_solr + // @see https://webgate.ec.europa.eu/CITnet/jira/browse/ISAICP-4907 + $solarium_query->addParam('defType', 'edismax'); + /** @var \Drupal\search_api_field\Plugin\Field\FieldType\SearchItem $item */ if (!$item = $query->getOption('search_api_field item')) { return;