You are here

private function SearchApiElasticsearchConnectorStats::getStatsMapping in Elasticsearch Connector 7

Same name and namespace in other branches
  1. 7.5 modules/elasticsearch_connector_search_api/includes/elasticsearch_stats.inc \SearchApiElasticsearchConnectorStats::getStatsMapping()
  2. 7.2 modules/elasticsearch_connector_search_api/includes/elasticsearch_stats.inc \SearchApiElasticsearchConnectorStats::getStatsMapping()

Return the mapping required by the statistics module.

Parameters

string $ttl:

Return value

array

1 call to SearchApiElasticsearchConnectorStats::getStatsMapping()
SearchApiElasticsearchConnectorStats::createStatsType in modules/elasticsearch_connector_search_api/includes/elasticsearch_stats.inc
Create Elasticsearch connector search api statistics type.

File

modules/elasticsearch_connector_search_api/includes/elasticsearch_stats.inc, line 67
@author nikolayignatov

Class

SearchApiElasticsearchConnectorStats

Code

private function getStatsMapping() {

  // Index Mapping
  $my_type_mapping = array(
    '_source' => array(
      'enabled' => TRUE,
    ),
    '_all' => array(
      'enabled' => TRUE,
    ),
    '_ttl' => array(
      'enabled' => TRUE,
      'default' => $this->ttl,
    ),
    'properties' => array(
      'server_name' => array(
        'type' => 'string',
        'index' => 'not_analyzed',
      ),
      'index_name' => array(
        'type' => 'string',
        'index' => 'not_analyzed',
      ),
      'keywords_original' => array(
        'type' => 'string',
        'index' => 'not_analyzed',
      ),
      'keywords' => array(
        'type' => 'string',
        'index' => 'not_analyzed',
      ),
      'filters' => array(
        'type' => 'string',
        'index' => 'not_analyzed',
      ),
      'sort' => array(
        'type' => 'string',
        'index' => 'not_analyzed',
      ),
      'uid' => array(
        'type' => 'long',
      ),
      'results' => array(
        'type' => 'long',
      ),
      'username' => array(
        'type' => 'string',
        'index' => 'not_analyzed',
      ),
      'timestamp' => array(
        'type' => 'date',
      ),
    ),
  );
  return $my_type_mapping;
}