def METHOD_NAME():
    config = search.configs.PostSearchConfig()
    with unittest.mock.patch("szurubooru.func.cache.has"), unittest.mock.patch(
        "szurubooru.func.cache.put"
    ):
        hashes = []
        def appender(key, _value):
            hashes.append(key)
        cache.has.side_effect = lambda *args: False
        cache.put.side_effect = appender
        executor = search.Executor(config)
        args = [
            ("", 1, 10),
            ("creation-time:2016", 1, 10),
            ("creation-time:2015", 1, 10),
            ("creation-time:2016-01", 1, 10),
            ("creation-time:2016-02", 1, 10),
            ("creation-time:2016-01-01", 1, 10),
            ("creation-time:2016-01-02", 1, 10),
            ("tag-count:1,3", 1, 10),
            ("tag-count:1,2", 1, 10),
            ("tag-count:1", 1, 10),
            ("tag-count:1..3", 1, 10),
            ("tag-count:1..4", 1, 10),
            ("tag-count:2..3", 1, 10),
            ("tag-count:1..", 1, 10),
            ("tag-count:2..", 1, 10),
            ("tag-count:..3", 1, 10),
            ("tag-count:..4", 1, 10),
            ("-tag-count:1..3", 1, 10),
            ("-tag-count:1..4", 1, 10),
            ("-tag-count:2..3", 1, 10),
            ("-tag-count:1..", 1, 10),
            ("-tag-count:2..", 1, 10),
            ("-tag-count:..3", 1, 10),
            ("-tag-count:..4", 1, 10),
            ("safety:safe", 1, 10),
            ("safety:safe", 1, 20),
            ("safety:safe", 2, 10),
            ("safety:sketchy", 1, 10),
            ("safety:safe test", 1, 10),
            ("-safety:safe", 1, 10),
            ("-safety:safe", 1, 20),
            ("-safety:safe", 2, 10),
            ("-safety:sketchy", 1, 10),
            ("-safety:safe test", 1, 10),
            ("safety:safe -test", 1, 10),
            ("-test", 1, 10),
        ]
        for arg in args:
            executor.execute(*arg)
        assert len(hashes) == len(args)
        assert len(set(hashes)) == len(args)