function elasticsearch_connector_statistics_get_mapping in Elasticsearch Connector 7.5
Same name and namespace in other branches
- 7 modules/elasticsearch_connector_statistics/elasticsearch_connector_statistics.module \elasticsearch_connector_statistics_get_mapping()
- 7.2 modules/elasticsearch_connector_statistics/elasticsearch_connector_statistics.module \elasticsearch_connector_statistics_get_mapping()
Default index mapping for the elasticsearch watchdog index.
Return value
array The mapping index array.
1 call to elasticsearch_connector_statistics_get_mapping()
- elasticsearch_connector_statistics_create_type in modules/
elasticsearch_connector_statistics/ elasticsearch_connector_statistics.module - Create Elasticsearch connector statistics type.
File
- modules/
elasticsearch_connector_statistics/ elasticsearch_connector_statistics.module, line 344 - Logs and displays access statistics for a site.
Code
function elasticsearch_connector_statistics_get_mapping() {
// Index Mapping
$my_type_mapping = array(
'_source' => array(
'enabled' => TRUE,
),
'_all' => array(
'enabled' => TRUE,
),
'properties' => array(
'title' => array(
'type' => 'text',
),
'path' => array(
'type' => 'keyword',
),
'domain' => array(
'type' => 'keyword',
),
'ip' => array(
'type' => 'ip',
),
'uid' => array(
'type' => 'long',
),
'timestamp' => array(
'type' => 'date',
'format' => 'epoch_second',
),
'username' => array(
'type' => 'keyword',
),
'page_language' => array(
'type' => 'keyword',
),
'referrer' => array(
'type' => 'keyword',
),
'entity' => array(
'type' => 'object',
'properties' => array(
'entity_id' => array(
'type' => 'keyword',
),
'entity_type' => array(
'type' => 'keyword',
),
'page' => array(
'type' => 'keyword',
),
),
),
),
);
// Alter the mapping if necessary.
drupal_alter('elasticsearch_connector_statistics_get_mapping', $my_type_mapping);
return $my_type_mapping;
}