)
                error = "\n".join([fmt_err(x) for x in missing_fields])
                raise ValueError(
                    f"You need to specify at least the following fields "
                    f"{missing_fields} or provide alternative field names in the env "
                    f"variables.\n\n{error}"
                )
        else:
            fields = default_fields
        # Vector search configuration
        if vector_search is None:
            if NEW_VERSION:
                # >= 11.4.0:
                #   VectorSearch(algorithm_configuration) --> VectorSearch(algorithms)
                # HnswVectorSearchAlgorithmConfiguration --> HnswAlgorithmConfiguration
                vector_search = VectorSearch(
                    algorithms=[
                        HnswAlgorithmConfiguration(
                            name="default",
                            kind="hnsw",
                            parameters={  # type: ignore
                                "m": 4,
                                "efConstruction": 400,
                                "efSearch": 500,
                                "metric": "cosine",
                            },
                        )
                    ]
                )
            else:  # < 11.4.0
                vector_search = VectorSearch(
                    algorithm_configurations=[
                        HnswVectorSearchAlgorithmConfiguration(
                            name="default",
                            kind="hnsw",
                            parameters={  # type: ignore
                                "m": 4,
                                "efConstruction": 400,
                                "efSearch": 500,
                                "metric": "cosine",
                            },
                        )
                    ]
                )
        # Create the semantic settings with the configuration
        if semantic_settings is None and semantic_configuration_name is not None:
            if NEW_VERSION:
                # <=11.4.0: SemanticSettings --> SemanticSearch
                # PrioritizedFields(prioritized_content_fields)