def _create_space(
        self,
        dim: int = 1024,
    ) -> int:
        """
        Create Cluster VectorStore space.

        Args:
            dim:dimension of vector.

        Return:
            code,0 failed for ,1 for success.

        """
        type_dict = {"int": "integer", "str": "string", "float": "float"}
        space_config = {
            "name": self.using_table_name,
            "partition_num": 1,
            "replica_num": 1,
            "engine": {
                "index_size": 1,
                "retrieval_type": "HNSW",
                "retrieval_param": {
                    "metric_type": "InnerProduct",
                    "nlinks": -1,
                    "efConstruction": -1,
                },
            },
        }
        tmp_proer = {
            "ref_doc_id": {"type": "string"},
            "text": {"type": "string"},
            "text_embedding": {
                "type": "vector",
                "index": True,
                "dimension": dim,
                "store_type": "MemoryOnly",
            },
        }
        for item in self.field_list:
            tmp_proer[item["field"]] = {"type": type_dict[item["type"]]}
        space_config["properties"] = tmp_proer

        return self._vearch.create_space(self.using_db_name, space_config)

        Create Cluster VectorStore space.

        Args:
            dim:dimension of vector.

        Return:
            code,0 failed for ,1 for success.

        
llama-index-integrations/vector_stores/llama-index-vector-stores-vearch/llama_index/vector_stores/vearch/base.py