async def _acreate_index(self, index_name: Optional[str]) -> None:
        """
        Asynchronous version of index creation with optional compression.

            Creates a default index based on the supplied index name, key field names, and metadata filtering keys.
        """
        from azure.search.documents.indexes.models import (
            ExhaustiveKnnAlgorithmConfiguration,
            ExhaustiveKnnParameters,
            HnswAlgorithmConfiguration,
            HnswParameters,
            SearchableField,
            SearchField,
            SearchFieldDataType,
            SearchIndex,
            SemanticConfiguration,
            SemanticField,
            SemanticPrioritizedFields,
            SemanticSearch,
            SimpleField,
            VectorSearch,
            VectorSearchAlgorithmKind,
            VectorSearchAlgorithmMetric,
            VectorSearchProfile,
        )

        logger.info(f"Configuring {index_name} fields for Azure AI Search")
        fields = [
            SimpleField(name=self._field_mapping["id"], type="Edm.String", key=True),
            SearchableField(
                name=self._field_mapping["chunk"],
                type="Edm.String",
                analyzer_name=self._language_analyzer,
                hidden=self._field_mapping["chunk"] in self._hidden_field_keys,
            ),
            SearchField(
                name=self._field_mapping["embedding"],
                type=SearchFieldDataType.Collection(SearchFieldDataType.Single),
                searchable=True,
                vector_search_dimensions=self._embedding_dimensionality,
                vector_search_profile_name=self._vector_profile_name,
                hidden=self._field_mapping["embedding"] in self._hidden_field_keys,
            ),
            SimpleField(
                name=self._field_mapping["metadata"],
                type="Edm.String",
                hidden=self._field_mapping["metadata"] in self._hidden_field_keys,
            ),
            SimpleField(
                name=self._field_mapping["doc_id"],
                type="Edm.String",
                filterable=True,
                hidden=self._field_mapping["doc_id"] in self._hidden_field_keys,
            ),
        ]
        logger.info(f"Configuring {index_name} metadata fields")
        metadata_index_fields = self._create_metadata_index_fields()
        fields.extend(metadata_index_fields)
        # Determine the compression type
        compressions = self._get_compressions()

        logger.info(
            f"Configuring {index_name} vector search with {self._compression_type} compression"
        )
        # Configure the vector search algorithms and profiles
        vector_search = VectorSearch(
            algorithms=[
                HnswAlgorithmConfiguration(
                    name="myHnsw",
                    kind=VectorSearchAlgorithmKind.HNSW,
                    # For more information on HNSw parameters, visit https://learn.microsoft.com//azure/search/vector-search-ranking#creating-the-hnsw-graph
                    parameters=HnswParameters(
                        m=4,
                        ef_construction=400,
                        ef_search=500,
                        metric=VectorSearchAlgorithmMetric.COSINE,
                    ),
                ),
                ExhaustiveKnnAlgorithmConfiguration(
                    name="myExhaustiveKnn",
                    kind=VectorSearchAlgorithmKind.EXHAUSTIVE_KNN,
                    parameters=ExhaustiveKnnParameters(
                        metric=VectorSearchAlgorithmMetric.COSINE,
                    ),
                ),
            ],
            compressions=compressions,
            profiles=[
                VectorSearchProfile(
                    name="myHnswProfile",
                    algorithm_configuration_name="myHnsw",
                    compression_name=(
                        compressions[0].compression_name if compressions else None
                    ),
                ),
                VectorSearchProfile(
                    name="myExhaustiveKnnProfile",
                    algorithm_configuration_name="myExhaustiveKnn",
                    compression_name=None,  # Exhaustive KNN doesn't support compression at the moment
                ),
            ],
        )
        logger.info(f"Configuring {index_name} semantic search")
        semantic_config = SemanticConfiguration(
            name=self._semantic_configuration_name or "mySemanticConfig",
            prioritized_fields=SemanticPrioritizedFields(
                title_field=(
                    SemanticField(field_name="title")
                    if "title" in self._metadata_to_index_field_map
                    else None
                ),
                content_fields=[SemanticField(field_name=self._field_mapping["chunk"])],
                keywords_fields=(
                    [SemanticField(field_name="keyWords")]
                    if "keyWords" in self._metadata_to_index_field_map
                    else None
                ),
            ),
        )

        semantic_search = SemanticSearch(configurations=[semantic_config])

        index = SearchIndex(
            name=index_name,
            fields=fields,
            vector_search=vector_search,
            semantic_search=semantic_search,
        )
        logger.debug(f"Creating {index_name} search index")

        await self._async_index_client.create_index(index)

        Asynchronous version of index creation with optional compression.

            Creates a default index based on the supplied index name, key field names, and metadata filtering keys.
        
llama-index-integrations/vector_stores/llama-index-vector-stores-azureaisearch/llama_index/vector_stores/azureaisearch/base.py