From 46f935186bc068df676dfd03faf91f35aa8fae4a Mon Sep 17 00:00:00 2001 From: Chayim Date: Sun, 14 Nov 2021 14:14:00 +0200 Subject: FT.EXPLAINCLI intentionally raising NotImplementedError (#1705) --- redis/commands/search/commands.py | 4 ++++ tests/test_search.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index 296fb25..0cee2ad 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -17,6 +17,7 @@ ADD_CMD = "FT.ADD" ADDHASH_CMD = "FT.ADDHASH" DROP_CMD = "FT.DROP" EXPLAIN_CMD = "FT.EXPLAIN" +EXPLAINCLI_CMD = "FT.EXPLAINCLI" DEL_CMD = "FT.DEL" AGGREGATE_CMD = "FT.AGGREGATE" CURSOR_CMD = "FT.CURSOR" @@ -376,6 +377,9 @@ class SearchCommands: args, query_text = self._mk_query_args(query) return self.execute_command(EXPLAIN_CMD, *args) + def explain_cli(self, query): # noqa + raise NotImplementedError("EXPLAINCLI will not be implemented.") + def aggregate(self, query): """ Issue an aggregation query diff --git a/tests/test_search.py b/tests/test_search.py index 75559d3..d1fc75f 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -611,6 +611,12 @@ def test_explain(client): assert res +@pytest.mark.redismod +def test_explaincli(client): + with pytest.raises(NotImplementedError): + client.ft().explain_cli("foo") + + @pytest.mark.redismod def test_summarize(client): createIndex(client.ft()) -- cgit v1.2.1