If a client configures this module with content type exclusions and removes one or more of the excluded content types from the site, the apachesolr_multisitesearch_query_exclusions variable will still contain those now removed content types within the array until the configuration page is re-saved.
The search query is still altered with these invalid bundles as fq arguments but without a field value:
(excerpt from query sent to Solr)
&fq=-bundle_name%3A%22Advanced%20Poll%22 <= "Advanced Poll" content type still present
&fq=-bundle_name%3A <= No longer existing content type
&fq=-bundle_name%3A <= No longer existing content type
This results in the search query having syntax errors and prevents Solr search from working entirely.
I would suggest doing an additional check within apachesolr_multisitesearch_apachesolr_query_alter() to make sure that $query_exclusion_options[$key] is not empty.
Comment | File | Size | Author |
---|---|---|---|
#2 | apachesolr_multisitesearch-2139477-2.patch | 814 bytes | janusman |
Comments
Comment #1
jastraat CreditAttribution: jastraat commentedComment #2
janusman CreditAttribution: janusman at Acquia commentedAttached patch, please review.
Comment #3
rob.costello CreditAttribution: rob.costello at Wired Canvas commentedI was having the same issue and this patch sorted it. Thanks!
Comment #5
janusman CreditAttribution: janusman at Acquia commented