Hi,
first of all I'd like to thank you for this wonderful module.
I created a view which gives me a date range of filters. I have called the view "date". When I enable the "current search"-block from apache_solr I can see that the facets of my view are shown as date:facet_2 (I guess VIEW_NAME:KEYNO_OF_FACET) instead of the friendly name.
cheers
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | apachesolr_facetbuilder.module.patch | 916 bytes | mtsanford |
| #5 | apachesolr_facetbuilder.module.patch | 763 bytes | mtsanford |
Comments
Comment #1
xurubo93 commentedI've found the solution:
You have to insert 2 values in your implementation of hook_apachesolr_facets() apachesolr_facebuilder_apachesolr_facets:
1.) display_callback
2.) field_name
Please consider it when committing the next update.
Comment #2
ronan commentedThanks for tracking this down. Can you tell me what version of Solr and what version of Drupal ApacheSolr module you're using? I haven't experienced this in our setups and would like to reproduce it before making the change.
Comment #3
xurubo93 commentedI'm using the newest dev-version apachesolr-6.x-2.x-dev (2010-Jul-26) as Drupal module and I have setup solr 1.4.0 on my server.
Cheers
Comment #4
ronan commentedThanks for the info. I'll try switching my local dev copies over and see if I can reproduce it.
Comment #5
mtsanford commentedI was getting the same problem with 6.x-2.0-beta3 of apachersolr. I was also getting "Illegal offset type" PHP errors.
This patch appears to fix the problem it. I don't know if this is due to a change in the $facet argument passed to the theme by the apachesolr module, as the PHP error happened during theming according to the call stack:
apachesolr_facetbuilder_facet_name (Array, 4 elements)
theme_apachesolr_breadcrumb_facet (Array, 2 elements)
call_user_func_array (Array, 4 elements)
theme (Array, 4 elements)
apachesolr_search_nested_facet_items (Array, 4 elements)
apachesolr_search_currentsearch_block (Array, 4 elements)
....etc
Comment #6
mtsanford commentedNew patch. That one broke the main facetbuilder block's facet names.