diff --git a/code/web/release_notes/24.06.00.MD b/code/web/release_notes/24.06.00.MD index e4d4e8507b..e5b29e87b1 100644 --- a/code/web/release_notes/24.06.00.MD +++ b/code/web/release_notes/24.06.00.MD @@ -18,6 +18,11 @@ //kirstien //kodi +### EDS Updates +- Add toggle for defaulting "Full Text" Limiter on/off (Ticket 129247) (*KL*) + +### Searching Updates +- Fixed issue where multiselect facets were not allowing multiple values to be selected when searching (Tickets 131841, 131923) (*KL, MDN*) //other diff --git a/code/web/sys/DBMaintenance/version_updates/24.06.00.php b/code/web/sys/DBMaintenance/version_updates/24.06.00.php index 810df2c591..9e7537d6a4 100644 --- a/code/web/sys/DBMaintenance/version_updates/24.06.00.php +++ b/code/web/sys/DBMaintenance/version_updates/24.06.00.php @@ -17,6 +17,13 @@ function getUpdates24_06_00(): array { //kirstien - ByWater //kodi - ByWater + 'full_text_limiter' => [ + 'title' => 'Full Text Limiter', + 'description' => 'Adds toggle for defaulting the full text limiter on/off for Ebsco EDS.', + 'sql' => [ + "ALTER TABLE ebsco_eds_settings ADD COLUMN fullTextLimiter TINYINT NOT NULL DEFAULT 1;", + ], + ], //full_text_limiter //other diff --git a/code/web/sys/Ebsco/EDSSettings.php b/code/web/sys/Ebsco/EDSSettings.php index f2e8ae8f14..ec6d6aa75b 100644 --- a/code/web/sys/Ebsco/EDSSettings.php +++ b/code/web/sys/Ebsco/EDSSettings.php @@ -9,6 +9,7 @@ class EDSSettings extends DataObject { public $edsApiUsername; public $edsApiPassword; public $edsSearchProfile; + public $fullTextLimiter; public static function getObjectStructure($context = ''): array { return [ @@ -54,6 +55,13 @@ public static function getObjectStructure($context = ''): array { 'description' => 'The password to use when connecting to the EBSCO API', 'hideInLists' => true, ], + 'fullTextLimiter' => [ + 'property' => 'fullTextLimiter', + 'type' => 'checkbox', + 'label' => 'Full Text Limiter', + 'description' => 'Enables/disables the full text limiter being automatically checked.', + 'default' => true, + ], ]; } } \ No newline at end of file diff --git a/code/web/sys/SearchObject/EbscoEdsSearcher.php b/code/web/sys/SearchObject/EbscoEdsSearcher.php index 29dbba4de1..b5046d590e 100644 --- a/code/web/sys/SearchObject/EbscoEdsSearcher.php +++ b/code/web/sys/SearchObject/EbscoEdsSearcher.php @@ -787,6 +787,10 @@ public function getRecords($ids) { public function getLimitList() { global $memCache; $limitOptions = $memCache->get('ebsco_eds_limit_options_' . $this->getSettings()->edsApiProfile); + $fullText = true; + if (!$this->edsSettings->fullTextLimiter){ + $fullText = false; + } if ($limitOptions === false) { $searchOptions = $this->getSearchOptions(); $limitOptions = []; @@ -801,7 +805,7 @@ public function getLimitList() { 'defaultOn' => false, ]; if ($limit == 'FT') { - $limitOptions[$limit]['defaultOn'] = true; + $limitOptions[$limit]['defaultOn'] = $fullText; } } } @@ -814,6 +818,9 @@ public function getLimitList() { if (array_key_exists($limit, $this->limiters)) { $limitIsApplied = ($this->limiters[$limit]) == 'y' ? 1 : 0; } else { + if ($limit == 'FT') { + $limitOption['defaultOn'] = $fullText; + } $limitIsApplied = $limitOption['defaultOn']; } $limitList[$limit] = [ diff --git a/code/web/sys/SearchObject/SolrSearcher.php b/code/web/sys/SearchObject/SolrSearcher.php index 42a44ec3c5..e415277c8b 100644 --- a/code/web/sys/SearchObject/SolrSearcher.php +++ b/code/web/sys/SearchObject/SolrSearcher.php @@ -346,7 +346,15 @@ public function processSearch($returnIndexErrors = false, $recommendations = fal if (!empty($facetConfig)) { $facetSet['limit'] = $this->facetLimit; foreach ($facetConfig as $facetField => $facetInfo) { - $facetSet['field'][$facetField] = $facetInfo; +/* $facetSet['field'][$facetField] = $facetInfo;*/ + $facetName = $facetInfo->facetName; + $isMultiSelect = $facetInfo->multiSelect; + if ($isMultiSelect) { + $facetKey = empty($facetInfo->id) ? $facetName : $facetInfo->id; + $facetSet['field'][$facetField] = "{!ex=$facetKey}" . $facetField; + }else{ + $facetSet['field'][$facetField] = $facetName; + } } if ($this->facetOffset != null) { $facetSet['offset'] = $this->facetOffset;