Posted by gdoteof on November 6, 2009 at 3:45am
Jump to:
| Project: | Apache Solr Search Integration |
| Version: | 6.x-1.0-rc3 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I see so much reference to cck facets, but I don't seem to have any available. They don't show up in my blocks. I realized maybe they should be showing up in 'enabled filters' but there are only things for taxonomy, nothing for CCK fields.
Comments
#1
It depends on what kind of CCK fields you have. The only automatic CCK filters are for text fields with option widgets (check boxes, radio buttons, select lists). Do you have fields of these types that aren't showing up? That would be a bug. Other CCK fields won't show up automatically. They can, however, be added using a custom module that implements the right hooks.
#2
i do have them for select lists. I tried making a custom one for an autocomplete box following the tutorial at acquia
#3
The tutorial at Acquia is unfortunately slightly out of date. No better documentation is available at the moment.
#4
<?php
function my_module_cck_field_mappings() {
$mappings = array();
$mappings['userreference'] = array(
'callback' => 'my_module_userreference_callback',
'index_type' => 'string',
'widget_types' => array(
'userreference_autocomplete' => TRUE,
),
);
return $mappings;
}
function my_module_userreference_callback($node, $fieldname) {
$fields = array();
foreach($node->$fieldname as $field){
$fields[] = array('safe' => check_plain($field['value']));
}
return $fields;
}
?>
Am I close? Anything I do show you to get a better idea of why I am not gettign any cck facets?
#5
I should have been more clear in #2. I do not have any cck facets, period. I do have cck fields that use select lists
#6
CCK integration has been much improved since rc3. Is this still an issue when you upgrade to 1.0?
#7
No reply from OP in 7 months.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.