Closed (duplicate)
Project:
Apache Solr Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2009 at 13:43 UTC
Updated:
5 Feb 2011 at 19:15 UTC
The current 6.2 code for CCK fields looks like the following. I want to get rid of the widget key as it is redundant and not scalable (any module can add widgets for fields). The original intent was to avoid indexing text fields that don't lend themselves to being faceted upon. A different strategy should be found to achieve that goal.
function apachesolr_cck_fields() {
static $fields;
if (is_null($fields)) {
$fields = array();
// If CCK isn't enabled, do nothing.
if (module_exists('content')) {
// A single default mapping for all text fields.
$mappings['text'] = array(
'optionwidgets_select' => array('indexing callback' => '',
'display callback' => 'apachesolr_cck_text_field_callback',
'index_type' => 'string',
),
'optionwidgets_buttons' => array('indexing callback' => '',
'display callback' => 'apachesolr_cck_text_field_callback',
'index_type' => 'string',
),
);
$mappings['nodereference'] = array(
'nodereference_buttons' => array(
'display callback' => 'apachesolr_cck_nodereference_field_callback',
'index_type' => 'integer',
),
'nodereference_select' => array(
'display callback' => 'apachesolr_cck_nodereference_field_callback',
'index_type' => 'integer',
),
'nodereference_autocomplete' => array(
'display callback' => 'apachesolr_cck_nodereference_field_callback',
'index_type' => 'integer',
),
);
Comments
Comment #1
jpmckinney commentedNot a bug.
Comment #2
pwolanin commentedThe Field API handling has already been changed.