Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2012 at 16:36 UTC
Updated:
13 Jan 2012 at 10:43 UTC
Jump to comment: Most recent file
Comments
Comment #1
cpliakas commentedThe attached patch catches Exceptions and passes the message to the appropriate error handling functions.
Comment #2
pwolanin commentedI don't think we want to call apachesolr_failure()
Comment #3
cpliakas commentedI see why not. We wouldn't want to redirect on failure if that setting is configured. What about displaying a message? Would we want a
drupal_set_message()if the setting is configured or just have it fail silently to watchdog?Comment #4
pwolanin commentedI think it should fail and maybe put a message in watchdog - like we do for MLT block failure in apachesolr_search_mlt_suggestions()
Comment #5
cpliakas commentedAttached patch makes the suggested changes.
Comment #6
pwolanin commentedI'm curious how we are populating the value for $adapter->getSearchPath() since there is not a specific path associated with an environment. Maybe that's a setting in the earlier patch?
Comment #7
nick_vhfrom apachesolr/plugins/facetapi/adapter.inc
It goes to the hook_search_info path by default
Comment #8
cpliakas commentedI guess this goes back to the facets per search page discussion. To me it doesn't seem right to associate a path with an environment, since multiple search pages and therefore paths can be associated with a single environment. Another approach could be to add a setting to this feature looping over all paths associated with this environment and selecting which one the facet links should redirect to? I haven't looked too deeply at the code to see if this is possible, just throwing it out there.
But I don't mean to derail the topic of this thread. Regardless of the path issue, the patch does catch any exceptions and prevents fatal errors when the server is unavailable.
Comment #9
pwolanin commentedYes, I think we need to revisit this, especially if we remove the dependency on core search module.
I think conceptually it would make more sense to link to a specific search page, then we'd always know where the facet links go. The search page references an environment, but that can be changed.
Comment #10
pwolanin commentedcommitted bugfix patch, created #1394136: Link non-search page facets to a search page rather than environment as a follow-up
Comment #11
cpliakas commentedExcellent. Thanks!
Comment #12
nick_vhComment #13
cpliakas commentedPosted a follow-up issue at #1397526: Add an option to select which search page facets link to when displayed on non-search pages.
Comment #14
nick_vhCommitted exactly the same patch to the 6.x-3.x branch