public function getMapping($index, $type)
    {
        $mappings = $this->getMappings($index);

        if (!isset($mappings[$type])) {
            return null;
        }

        if (!isset($mappings[$type]['properties'])) {
            return [];
        }

        return $mappings[$type]['properties'];
    }