@ -47,6 +47,21 @@ function roblib_search_islandscholar_config_form($form, &$form_state) {
'#description' => t('The number of results to display in the Bento box'),
'#description' => t('The number of results to display in the Bento box'),
'#required' => TRUE,
'#required' => TRUE,
);
);
$form['roblib_search_islandscholar_fq'] = array(
'#type' => 'textarea',
'#title' => t('Filter Query'),
'#default_value' => variable_get('roblib_search_islandscholar_fq', 'PID:ir* AND (RELS_EXT_hasModel_uri_ms:info\:fedora/ir\:thesisCModel OR RELS_EXT_hasModel_uri_ms:info\:fedora/ir\:citationCModel)'),
'#description' => t('A query used to restrict the results to namespace and content models'),
// Block caching options (per role, per user, etc.)
// Block caching options (per role, per user, etc.)
'cache' => DRUPAL_CACHE_PER_ROLE, // default
'cache' => DRUPAL_CACHE_PER_ROLE, // default
);
);
@ -141,9 +156,10 @@ function roblib_search_islandscholar_get_search_url($query){
$data = array(
$data = array(
'wt' => 'json',
'wt' => 'json',
'q' => $query ,
'q' => $query ,
'fq' => 'PID:ir* AND (rels.hasModel:info\:fedora/islandora\:thesisCModel OR rels.hasModel:info\:fedora/islandora\:citationCModel)',
'fq' => variable_get('roblib_search_islandscholar_fq','PID:ir* AND (RELS_EXT_hasModel_uri_ms:info\:fedora/ir\:thesisCModel OR RELS_EXT_hasModel_uri_ms:info\:fedora/ir\:citationCModel)'),