diff --git a/apachesolr.module b/apachesolr.module index 440d4a0..13e8d5e 100644 --- a/apachesolr.module +++ b/apachesolr.module @@ -1106,7 +1106,7 @@ function apachesolr_set_default_environment($env_id) { * * * @param string $env_id - * + * * @return DrupalApacheSolrServiceInterface $solr * * @throws Exception @@ -2017,6 +2017,12 @@ function apachesolr_entity_fields($entity_type = 'node') { // The field info array. $row['field'] = $field; + // Cardinality: The number of values the field can hold. Legal values + // are any positive integer or FIELD_CARDINALITY_UNLIMITED. + if ($row['field']['cardinality'] != 1) { + $row['multiple'] = TRUE; + } + // @todo: for fields like taxonomy we are indexing multiple Solr fields // per entity field, but are keying on a single Solr field name here. $function = !empty($row['name callback']) ? $row['name callback'] : NULL; @@ -2751,4 +2757,4 @@ function apachesolr_ctools_environment_export($environment, $indent) { $additions_top = array(); $additions_bottom = array('conf' => $environment->conf, 'index_bundles' => $index_bundles); return ctools_export_object('apachesolr_environment', $environment, $indent, NULL, $additions_top, $additions_bottom); -} \ No newline at end of file +}