def get_mapping(self):
        """return the current index mapping"""
        if self._host_major_ver <= 6:
            m = self._es.indices.get_mapping(
                index=self._index,
                doc_type=self._doc_type,
            )
            return m[self._index]["mappings"]
        elif self._host_major_ver == 7:
            m = self._es.indices.get_mapping(
                index=self._index
            )
            # fake the mapping doc_type
            m = {
                self._doc_type: m[self._index]["mappings"]
            }
            return m
        else:
            raise RuntimeError(f"Server Elasticsearch version is {self._host_major_ver} "
                               "which is unsupported when using old ESIndexer class")