Last active
August 29, 2015 14:21
-
-
Save yulgit1/513cb490863c41fed5bf to your computer and use it in GitHub Desktop.
k2findit search conditionals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catalog controller: | |
search fields (in catalog controller): | |
"all_fields": default request handler, default_solr_params | |
"full_text": fulltext request handler (like default but including open and restricted fulltext in search), fq includes archivaldigitized | |
"full_text " :fulltext open request handler (like default but including open fulltext in search), fq including archivaldigitized | |
NOte: if full_text and not logged in then "full_text ", if logged in then "full_text" | |
filter query (fq) conditionals (in solr_helper): | |
if (global access and "all_fields") - remove restricted filter | |
if (global access and "fulltext") - remove restricted filter and add archivalDigitized | |
if(notGlobalAccessButLoggedIn and all_fields) - remove restrictions only for those objects that were aeon whitelisted | |
if(notGlobalAccessButLoggedIn and fulltext)- remove restrictions only for those objects that were aeon whitelisted at both the arhival/default and digitized level | |
To test: | |
Lookup last solr query in logs using command like: | |
tail -n 1000 development.log | grep "Solr query" | |
(makesure fq defined in catalog controller and solr helper are actually what happens, and that the qf and pfs are there for "fulltext" and "fulltext ") | |
test catalog controller "allfields" fq - (don't login, default search) | |
test catalog controller "fulltext " - (don't login, fulltext search) | |
test solr helper if (global_access && searchfield == "all_fields") - (aeonValid default search) | |
test solr helper if (global_access && searchfield == "fulltext") - (aeonValid fulltext search) | |
test solr helper if (!global_access && searchfield == "all_fields" && uid.length > 0) (aeonReject default search) | |
test solr helper if (!global_access && searchfield == "fulltext" && uid.length > 0) (aeonRject fulltext) | |
test facets work in all conditions | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment