def test_custom_index_settings(
        self, sync_client: Elasticsearch, index: str
    ) -> None:
        """Test that the custom index settings are applied."""
        test_settings = {
            "analysis": {
                "tokenizer": {
                    "custom_tokenizer": {"type": "pattern", "pattern": "[,;\\s]+"}
                },
                "analyzer": {
                    "custom_analyzer": {
                        "type": "custom",
                        "tokenizer": "custom_tokenizer",
                    }
                },
            }
        }

        test_mappings = {
            "my_field": {"type": "keyword"},
            "another_field": {"type": "text", "analyzer": "custom_analyzer"},
        }

        store = VectorStore(
            index=index,
            retrieval_strategy=DenseVectorStrategy(distance=DistanceMetric.COSINE),
            embedding_service=FakeEmbeddings(),
            num_dimensions=10,
            client=sync_client,
            metadata_mappings=test_mappings,
            custom_index_settings=test_settings,
        )

        sample_texts = [
            "Sample text one, with some keywords.",
            "Another; sample, text with; different keywords.",
            "Third example text, with more keywords.",
        ]
        store.add_texts(texts=sample_texts)

        # Fetch the actual index settings from Elasticsearch
        actual_settings = sync_client.indices.get_settings(index=index)

        # Assert that the custom settings were applied correctly
        custom_settings_applied = actual_settings[index]["settings"]["index"][
            "analysis"
        ]
        assert (
            custom_settings_applied == test_settings["analysis"]
        ), f"Expected custom index settings {test_settings} but got {custom_settings_applied}"
Test that the custom index settings are applied.
test_elasticsearch/test_server/test_vectorstore/test_vectorstore.py