You are here

function elasticsearch_watchdog_get_mapping in Elasticsearch Connector 7.5

Same name and namespace in other branches
  1. 7 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_get_mapping()
  2. 7.2 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_get_mapping()

Default index mapping for the elasticsearch watchdog index.

Return value

array The mapping index array.

1 call to elasticsearch_watchdog_get_mapping()
elasticsearch_watchdog_create_type in modules/elasticsearch_watchdog/elasticsearch_watchdog.module
Create Elasticsearch watchdog type.

File

modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc, line 74
Created on Jan 06, 2014

Code

function elasticsearch_watchdog_get_mapping() {

  // Index Mapping
  $my_type_mapping = array(
    '_source' => array(
      'enabled' => TRUE,
    ),
    '_all' => array(
      'enabled' => FALSE,
    ),
    'properties' => array(
      'uid' => array(
        'type' => 'integer',
      ),
      'username' => array(
        'type' => 'keyword',
      ),
      'type' => array(
        'type' => 'keyword',
      ),
      'message' => array(
        'type' => 'keyword',
      ),
      'full_massage' => array(
        'type' => 'text',
      ),
      'variables' => array(
        'type' => 'keyword',
      ),
      'severity' => array(
        'type' => 'keyword',
      ),
      'link' => array(
        'type' => 'keyword',
      ),
      'location' => array(
        'type' => 'keyword',
      ),
      'referer' => array(
        'type' => 'keyword',
      ),
      'hostname' => array(
        'type' => 'keyword',
      ),
      'domain' => array(
        'type' => 'keyword',
      ),
      'timestamp' => array(
        'type' => 'long',
      ),
      'microtime' => array(
        'type' => 'float',
      ),
      'date' => array(
        'type' => 'date',
      ),
    ),
  );
  return $my_type_mapping;
}