You are here

function field_apachesolr_field_mappings in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr.module \field_apachesolr_field_mappings()

Implements hook_apachesolr_field_mappings().

File

./apachesolr.module, line 2561
Integration with the Apache Solr search application.

Code

function field_apachesolr_field_mappings() {
  $mappings = array(
    'list_integer' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'map callback' => 'apachesolr_fields_list_facet_map_callback',
      'index_type' => 'integer',
      'facets' => TRUE,
      'query types' => array(
        'term',
        'numeric_range',
      ),
      'query type' => 'term',
      'facet missing allowed' => TRUE,
    ),
    'list_float' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'map callback' => 'apachesolr_fields_list_facet_map_callback',
      'index_type' => 'float',
      'facets' => TRUE,
      'query types' => array(
        'term',
        'numeric_range',
      ),
      'query type' => 'term',
      'facet missing allowed' => TRUE,
    ),
    'list_text' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'map callback' => 'apachesolr_fields_list_facet_map_callback',
      'index_type' => 'string',
      'facets' => TRUE,
      'facet missing allowed' => TRUE,
    ),
    'list_boolean' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'map callback' => 'apachesolr_fields_list_facet_map_callback',
      'index_type' => 'boolean',
      'facets' => TRUE,
      'facet missing allowed' => TRUE,
    ),
    'number_integer' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'index_type' => 'tint',
      'facets' => TRUE,
      'query types' => array(
        'term',
        'numeric_range',
      ),
      'query type' => 'term',
      'facet mincount allowed' => TRUE,
    ),
    'number_decimal' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'index_type' => 'tfloat',
      'facets' => TRUE,
      'query types' => array(
        'term',
        'numeric_range',
      ),
      'query type' => 'term',
      'facet mincount allowed' => TRUE,
    ),
    'number_float' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'index_type' => 'tfloat',
      'facets' => TRUE,
      'query types' => array(
        'term',
        'numeric_range',
      ),
      'query type' => 'term',
      'facet mincount allowed' => TRUE,
    ),
    'taxonomy_term_reference' => array(
      'map callback' => 'facetapi_map_taxonomy_terms',
      'hierarchy callback' => 'facetapi_get_taxonomy_hierarchy',
      'indexing_callback' => array(
        'apachesolr_term_reference_indexing_callback',
      ),
      'index_type' => 'integer',
      'facet_block_callback' => 'apachesolr_search_taxonomy_facet_block',
      'facets' => TRUE,
      'query types' => array(
        'term',
      ),
      'query type' => 'term',
      'facet mincount allowed' => TRUE,
    ),
    'text' => array(
      'indexing_callback' => array(
        'apachesolr_fields_default_indexing_callback',
      ),
      'index_type' => 'string',
      'facets' => TRUE,
      'facet missing allowed' => TRUE,
    ),
  );
  return $mappings;
}