@@ -101,8 +101,7 @@ class SearchObject_SummonSearcher extends SearchObject_BaseSearcher{
101
101
protected $ rangeFacets = [
102
102
'PublicationDate,1911:1920,1921:1930,1931:1940,1941:1950,1951:1960,1961:1970,1971:1980,1981:1990,1991:2000,2001:2010,2011:2020,2021:2030 ' ,
103
103
];
104
- protected $ rangeFilters = [
105
- ];
104
+ protected $ rangeFilters = array ();
106
105
107
106
protected $ limitList = [];
108
107
protected $ limitFields ;
@@ -281,7 +280,6 @@ public function getOptions () {
281
280
//allows access to records
282
281
's.role ' => 'authenticated ' ,
283
282
);
284
- var_dump ($ options );
285
283
return $ options ;
286
284
}
287
285
@@ -302,7 +300,6 @@ public function processData($recordData) {
302
300
$ this ->rangeFacetFields = $ recordData ['rangeFacetFields ' ];
303
301
$ this ->rangeFilters = $ recordData ['query ' ]['rangeFilters ' ];
304
302
}
305
- var_dump ($ recordData ['query ' ]['queryString ' ]);
306
303
return $ recordData ;
307
304
}
308
305
@@ -519,7 +516,6 @@ public function getFacetSet() {
519
516
public function getRangeFacetSet () {
520
517
$ availableRangeFacets = [];
521
518
$ this ->rangeFilters = [];
522
-
523
519
if (isset ($ this ->rangeFacetFields )) {
524
520
foreach ($ this ->rangeFacetFields as $ rangeFacetField ) {
525
521
$ facetId = $ rangeFacetField ['displayName ' ];
@@ -536,7 +532,7 @@ public function getRangeFacetSet() {
536
532
foreach ($ rangeFacetField ['counts ' ] as $ value ) {
537
533
$ rangeFacetValue = $ value ['range ' ];
538
534
$ rangeValueString = $ rangeFacetValue ['minValue ' ] . '- ' . $ rangeFacetValue ['maxValue ' ];
539
- $ isApplied = array_key_exists ($ facetId , $ this ->rangeFilterList ) && in_array ($ rangeValueString , $ this ->rangeFilterList [$ facetId ]);
535
+ $ isApplied = array_key_exists ($ facetId , $ this ->filterList ) && in_array ($ rangeValueString , $ this ->filterList [$ facetId ]);
540
536
541
537
$ rangeFacetSettings = [
542
538
'value ' => $ rangeFacetValue ['minValue ' ] . '- ' . $ rangeFacetValue ['maxValue ' ],
@@ -615,9 +611,9 @@ public function getSummonFilters() {
615
611
$ this ->filterList = array_merge ($ this ->limitList , $ this ->filterList );
616
612
}
617
613
foreach ($ this ->filterList as $ key => $ value ) {
618
- // if ($key === 'PublicationDate') {
619
- // continue;
620
- // }
614
+ if ($ key === 'PublicationDate ' ) {
615
+ continue ;
616
+ }
621
617
if (is_array ($ value )) {
622
618
foreach ($ value as $ val ) {
623
619
$ encodedValue = urlencode ($ val );
@@ -632,9 +628,12 @@ public function getSummonFilters() {
632
628
}
633
629
634
630
public function getSummonRangeFilters () {
635
- $ this ->rangeFilters = [] ;
631
+ $ this ->rangeFilters = array () ;
636
632
if (isset ($ this ->filterList )) {
637
633
foreach ($ this ->filterList as $ key =>$ value ) {
634
+ if ($ key !== 'PublicationDate ' ) {
635
+ continue ;
636
+ }
638
637
if (is_array ($ value )) {
639
638
foreach ($ value as $ val ) {
640
639
$ encodedValue = urlencode ($ val );
0 commit comments