The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 5062f8d3 authored by Demian Katz's avatar Demian Katz
Browse files

Implemented Summon query expansion.

- Resolves VUFIND-929.
parent dafc70c1
No related merge requests found
...@@ -77,6 +77,7 @@ IsScholarly:true = scholarly_limit ...@@ -77,6 +77,7 @@ IsScholarly:true = scholarly_limit
IsFullText:true = fulltext_limit IsFullText:true = fulltext_limit
excludeNewspapers:true = exclude_newspapers excludeNewspapers:true = exclude_newspapers
holdingsOnly:false = add_other_libraries holdingsOnly:false = add_other_libraries
queryExpansion:true = include_synonyms
; The order of display is as shown below ; The order of display is as shown below
; The name of the index field is on the left ; The name of the index field is on the left
......
...@@ -371,6 +371,7 @@ Import Record = "Import Record" ...@@ -371,6 +371,7 @@ Import Record = "Import Record"
Import to = "Import to " Import to = "Import to "
in = in in = in
In This Collection = "In This Collection" In This Collection = "In This Collection"
include_synonyms = "Expand results using synonyms"
information = "Information" information = "Information"
Institution = Institution Institution = Institution
Institutional Login = "Institutional Login" Institutional Login = "Institutional Login"
......
...@@ -371,6 +371,7 @@ Import Record = "Import Record" ...@@ -371,6 +371,7 @@ Import Record = "Import Record"
Import to = "Import to " Import to = "Import to "
in = in in = in
In This Collection = "In This Collection" In This Collection = "In This Collection"
include_synonyms = "Expand results using synonyms"
information = "Information" information = "Information"
Institution = Institution Institution = Institution
Institutional Login = "Institutional Login" Institutional Login = "Institutional Login"
......
...@@ -129,12 +129,15 @@ class Params extends \VuFind\Search\Base\Params ...@@ -129,12 +129,15 @@ class Params extends \VuFind\Search\Base\Params
// Grab checkbox facet details using the standard method: // Grab checkbox facet details using the standard method:
$facets = parent::getCheckboxFacets(); $facets = parent::getCheckboxFacets();
// Special case -- if we have a "holdings only" facet, we want this to // Special case -- if we have a "holdings only" or "expand query" facet,
// always appear, even on the "no results" screen, since setting this // we want this to always appear, even on the "no results" screen, since
// facet actually EXPANDS the result set, rather than reducing it: // setting this facet actually EXPANDS rather than reduces the result set.
if (isset($facets['holdingsOnly'])) { if (isset($facets['holdingsOnly'])) {
$facets['holdingsOnly']['alwaysVisible'] = true; $facets['holdingsOnly']['alwaysVisible'] = true;
} }
if (isset($facets['queryExpansion'])) {
$facets['queryExpansion']['alwaysVisible'] = true;
}
// Return modified list: // Return modified list:
return $facets; return $facets;
...@@ -225,6 +228,12 @@ class Params extends \VuFind\Search\Base\Params ...@@ -225,6 +228,12 @@ class Params extends \VuFind\Search\Base\Params
$params->set( $params->set(
'holdings', strtolower(trim($safeValue)) == 'true' 'holdings', strtolower(trim($safeValue)) == 'true'
); );
} else if ($filt['field'] == 'queryExpansion') {
// Special case -- "query expansion" is a separate parameter
// from other facets.
$params->set(
'expand', strtolower(trim($safeValue)) == 'true'
);
} else if ($filt['field'] == 'excludeNewspapers') { } else if ($filt['field'] == 'excludeNewspapers') {
// Special case -- support a checkbox for excluding // Special case -- support a checkbox for excluding
// newspapers: // newspapers:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment