/**
* Overridden to return exact type mapping if possible
*
* @param string $index
* @param string $type
* @param string $data Type of data to be retrieved
* @return array
* @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-mapping.html
*/
public function getMapping($index = '_all', $type = '_all', $data = 'properties')
{
$mapping = parent::getMapping($index, $type);
if ($index !== '_all' && $type !== '_all') {
$mapping = $mapping[$index]['mappings'][$type][$data];
}
return $mapping;
}