def test_supported_field_name_in_fieldnames_unstructured(self):
        """Test supported special chars in field names can be indexed, searched, and filtered on"""
        index_name = self.standard_unstructured_index_name

        docs = [{"_id": f"special_{i}", f"field_{special_str}": "hello"} for i, special_str in enumerate(
            self.supported_field_name)]

        # Ensure these special chars can be used in field names
        tensor_fields = [f"field_{special_str}" for special_str in self.supported_field_name]
        res = self.client.index(index_name).add_documents(docs, tensor_fields=tensor_fields)
        self.assertEqual(res["errors"], False)

        for special_str in self.supported_field_name:
            with self.subTest(f"Supported field name: {repr(special_str)}"):
                escaped_field_name = f"field_{special_str}".replace(special_str, f"{special_str}")
                res = self.client.index(index_name).search(q="hello",
                                                           filter_string=f"{escaped_field_name}:hello")
                self.assertEqual(f"special_{self.supported_field_name.index(special_str)}",
                                 res["hits"][0]["_id"], )
Test supported special chars in field names can be indexed, searched, and filtered on
tests/api_tests/v1/tests/api_tests/test_special_chars_in_fieldnames_and_filters.py