protected function mapData($data)
    {
        $values = array();

        foreach ($data->buckets as $bucket) {
            $values[$bucket->key] = $bucket->doc_count;
        }

        return $values;
    }
protected function mapData($data)
    {
        $values = array();

        foreach ($data->buckets as $bucket) {
            $values[$bucket->key] = $bucket->doc_count;
        }

        return $values;
    }
protected function mapData ( $ data ) { $ values = array ( ) ; foreach ( $ data -> buckets as $ bucket ) { $ values [ $ bucket -> key ] = $ bucket -> doc_count ; } return $ values ; }
Map Elasticsearch return array into a sane hash map.

@param mixed $data

@return array
Map Elasticsearch return array into a sane hash map .