Skip to content

Commit 4a75246

Browse files
authored
Merge pull request Aspen-Discovery#2235 from PTFS-Europe/DIS-232-Summon-Search-Indexes
Dis-232-Summon-Search-Indexes
2 parents 0adb6a7 + c29f05b commit 4a75246

File tree

2 files changed

+126
-20
lines changed

2 files changed

+126
-20
lines changed

code/web/release_notes/25.03.00.MD

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
// james
6363

6464
// alexander
65+
### Summon Updates
66+
- Update the Summon Search Indexes to match those found in Summon Serials Solutions. (DIS-232) (*AB*)
6567

6668
// chloe
6769

code/web/sys/SearchObject/SummonSearcher.php

+124-20
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class SearchObject_SummonSearcher extends SearchObject_BaseSearcher{
4848
protected $maxTopics = 1;
4949
protected $groupFilters = array();
5050
protected $openAccessFilter = false;
51-
protected $expand = false;
51+
protected $expand = true;
5252
protected $sortOptions = array();
5353
/**
5454
* @var string
@@ -73,12 +73,12 @@ class SearchObject_SummonSearcher extends SearchObject_BaseSearcher{
7373
protected $bookMark;
7474
protected $debug = false;
7575
protected $journalTitle = false;
76-
protected $lightWeightRes = false;
76+
protected $lightWeightRes = true;
7777
protected $sort = null;
7878
/**
7979
* @var string mixed
8080
*/
81-
private $searchIndex = 'Title';
81+
private $searchIndex = '';
8282
/**Facets, filters and limiters */
8383
//Values for the main facets - each has an array of available values
8484
protected $facets = [
@@ -737,21 +737,121 @@ public function getQuerySpeed() {
737737
*/
738738
public function getSearchIndexes() {
739739
return [
740-
"Title" => translate([
741-
'text' => "Title",
740+
'' => translate([
741+
'text' => 'All Fields',
742742
'isPublicFacing' => true,
743743
'inAttribute' => true,
744744
]),
745-
'All Text' => translate([
746-
'text' => "All Text",
745+
'AuthorCombined' => translate([
746+
'text' => 'Author',
747747
'isPublicFacing' => true,
748748
'inAttribute' => true,
749749
]),
750-
'Keyword' => translate([
751-
'text' => "Keyword",
750+
"TitleCombined" => translate([
751+
'text' => 'Title',
752752
'isPublicFacing' => true,
753753
'inAttribute' => true,
754-
])
754+
]),
755+
'PublicationTitle' => translate([
756+
'text' => 'Publication Title',
757+
'isPublicFacing' => true,
758+
'inAttribute' => true,
759+
]),
760+
'SubjectTerms' => translate([
761+
'text' => 'Subject Terms',
762+
'isPublicFacing' => true,
763+
'inAttribute' => true,
764+
]),
765+
'Abstract' => translate([
766+
'text' => 'Abstract',
767+
'isPublicFacing' => true,
768+
'inAttribute' => true,
769+
]),
770+
'CallNumAll' => translate([
771+
'text' => 'Call Number',
772+
'isPublicFacing' => true,
773+
'inAttribute' => true,
774+
]),
775+
'CODEN' => translate([
776+
'text' => 'CODEN',
777+
'isPublicFacing' => true,
778+
'inAttribute' => true,
779+
]),
780+
'DEWEY' => translate([
781+
'text' => 'Dewey',
782+
'isPublicFacing' => true,
783+
'inAttribute' => true,
784+
]),
785+
'DOI' => translate([
786+
'text' => 'DOI',
787+
'isPublicFacing' => true,
788+
'inAttribute' => true,
789+
]),
790+
'IsbnAll' => translate([
791+
'text' => 'ISBN',
792+
'isPublicFacing' => true,
793+
'inAttribute' => true,
794+
]),
795+
'IssnAll' => translate([
796+
'text' => 'ISSN',
797+
'isPublicFacing' => true,
798+
'inAttribute' => true,
799+
]),
800+
'Edition' => translate([
801+
'text' => 'Edition',
802+
'isPublicFacing' => true,
803+
'inAttribute' => true,
804+
]),
805+
'Fulltext' => translate([
806+
'text' => 'Full Text',
807+
'isPublicFacing' => true,
808+
'inAttribute' => true,
809+
]),
810+
'Genre' => translate([
811+
'text' => 'Genre',
812+
'isPublicFacing' => true,
813+
'inAttribute' => true,
814+
]),
815+
'GeographicLocations' => translate([
816+
'text' => 'Geographic Location',
817+
'isPublicFacing' => true,
818+
'inAttribute' => true,
819+
]),
820+
'Issue' => translate([
821+
'text' => 'Issue',
822+
'isPublicFacing' => true,
823+
'inAttribute' => true,
824+
]),
825+
'OCLC' => translate([
826+
'text' => 'OCLC Number',
827+
'isPublicFacing' => true,
828+
'inAttribute' => true,
829+
]),
830+
'PatentNumber' => translate([
831+
'text' => 'Patent Number',
832+
'isPublicFacing' => true,
833+
'inAttribute' => true,
834+
]),
835+
'Publisher' => translate([
836+
'text' => 'Publisher',
837+
'isPublicFacing' => true,
838+
'inAttribute' => true,
839+
]),
840+
'PublicationSeriesTitle' => translate([
841+
'text' => 'Series',
842+
'isPublicFacing' => true,
843+
'inAttribute' => true,
844+
]),
845+
'TemporalSubjectTerms' => translate([
846+
'text' => 'Time Period',
847+
'isPublicFacing' => true,
848+
'inAttribute' => true,
849+
]),
850+
'Volume' => translate([
851+
'text' => 'Volume',
852+
'isPublicFacing' => true,
853+
'inAttribute' => true,
854+
]),
755855
];
756856
}
757857

@@ -761,18 +861,22 @@ public function getDefaultIndex() {
761861
}
762862

763863
public function setSearchTerm() {
764-
if (strpos($this->searchTerms, ':') !== false) {
765-
[
766-
$searchIndex,
767-
$term,
768-
] = explode(':', $this->searchTerms, 2);
769-
$this->setSearchTerms([
770-
'lookfor' => $term,
771-
'index' => $searchIndex,
772-
]);
864+
if (is_array($this->searchTerms) && count($this->searchTerms) > 0) {
865+
if (strpos($this->searchTerms[0], ':') !== false) {
866+
[$searchIndex, $term] = explode(':', $this->searchTerms[0], 2);
867+
$this->setSearchTerms([
868+
'lookfor' => $term,
869+
'index' => $searchIndex,
870+
]);
871+
} else {
872+
$this->setSearchTerms([
873+
'lookfor' => $this->searchTerms[0],
874+
'index' => $this->getDefaultIndex(),
875+
]);
876+
}
773877
} else {
774878
$this->setSearchTerms([
775-
'lookfor' => $this->searchTerms,
879+
'lookfor' => '',
776880
'index' => $this->getDefaultIndex(),
777881
]);
778882
}

0 commit comments

Comments
 (0)