def test_get_filter_string_escaped_characters(self):
        r"""
        Ensure the \ character is added to vespa query before all special characters (\ and ")
        """
        test_cases = [
            # Equality terms
            # no escaped characters
            ('title:hello',
             'key contains "title", value contains "hello"'),
            # Unescaped backslash gets ignored (double quote does not need to be escaped by user)
            ('title:hel"l\\o',
             'key contains "title", value contains "hel\\"lo"'),
            # Escaped backslash is also escaped in vespa query
            ('title:hel\\"l\\\\o',
             'key contains "title", value contains "hel\\"l\\\\o"'),
             ('ti\\"t\\\\le:hello',
              'key contains "ti\\"t\\\\le", value contains "hello"'),
            # Range terms
              ('nu\\"m\\\\ber:[1 TO 100]',
               'key contains "nu\\"m\\\\ber", value >= 1, value <= 100'),
        ]

        for filter_string, expected_result in test_cases:
            with self.subTest(msg=f"Testing filter string: {filter_string}"):
                marqo_query = MarqoQuery(
                    index_name=self.vespa_index._marqo_index.name,
                    limit=10,
                    filter=filter_string,
                    score_modifiers=[],
                    expose_facets=False
                )
                result_filter_string = self.vespa_index._get_filter_term(marqo_query)
                self.assertIn(expected_result, result_filter_string,)

        Ensure the \ character is added to vespa query before all special characters (\ and ")
        
tests/unit_tests/marqo/core/semi_structured_vespa_index/test_semi_structured_vespa_index.py