@@ -48,7 +48,7 @@ class SearchObject_SummonSearcher extends SearchObject_BaseSearcher{
48
48
protected $ maxTopics = 1 ;
49
49
protected $ groupFilters = array ();
50
50
protected $ openAccessFilter = false ;
51
- protected $ expand = false ;
51
+ protected $ expand = true ;
52
52
protected $ sortOptions = array ();
53
53
/**
54
54
* @var string
@@ -73,12 +73,12 @@ class SearchObject_SummonSearcher extends SearchObject_BaseSearcher{
73
73
protected $ bookMark ;
74
74
protected $ debug = false ;
75
75
protected $ journalTitle = false ;
76
- protected $ lightWeightRes = false ;
76
+ protected $ lightWeightRes = true ;
77
77
protected $ sort = null ;
78
78
/**
79
79
* @var string mixed
80
80
*/
81
- private $ searchIndex = 'Title ' ;
81
+ private $ searchIndex = '' ;
82
82
/**Facets, filters and limiters */
83
83
//Values for the main facets - each has an array of available values
84
84
protected $ facets = [
@@ -737,21 +737,121 @@ public function getQuerySpeed() {
737
737
*/
738
738
public function getSearchIndexes () {
739
739
return [
740
- " Title " => translate ([
741
- 'text ' => " Title " ,
740
+ '' => translate ([
741
+ 'text ' => ' All Fields ' ,
742
742
'isPublicFacing ' => true ,
743
743
'inAttribute ' => true ,
744
744
]),
745
- 'All Text ' => translate ([
746
- 'text ' => " All Text " ,
745
+ 'AuthorCombined ' => translate ([
746
+ 'text ' => ' Author ' ,
747
747
'isPublicFacing ' => true ,
748
748
'inAttribute ' => true ,
749
749
]),
750
- ' Keyword ' => translate ([
751
- 'text ' => " Keyword " ,
750
+ " TitleCombined " => translate ([
751
+ 'text ' => ' Title ' ,
752
752
'isPublicFacing ' => true ,
753
753
'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
+ ]),
755
855
];
756
856
}
757
857
@@ -761,18 +861,22 @@ public function getDefaultIndex() {
761
861
}
762
862
763
863
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
+ }
773
877
} else {
774
878
$ this ->setSearchTerms ([
775
- 'lookfor ' => $ this -> searchTerms ,
879
+ 'lookfor ' => '' ,
776
880
'index ' => $ this ->getDefaultIndex (),
777
881
]);
778
882
}
0 commit comments