{"id":"92bbdc20a0b10825","repo":"redis/redis-py","slug":"explaincli-will-not-be-implemented","errorCode":null,"errorMessage":"EXPLAINCLI will not be implemented.","messagePattern":"EXPLAINCLI will not be implemented\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"redis/commands/search/commands.py","lineNumber":1423,"sourceCode":"        if isinstance(res, Pipeline):\n            return res\n\n        return self._parse_results(HYBRID_CMD, res, **options)\n\n    def explain(\n        self,\n        query: Union[str, Query],\n        query_params: Optional[Dict[str, Union[str, int, float, bytes]]] = None,\n    ):\n        \"\"\"Returns the execution plan for a complex query.\n\n        For more information see `FT.EXPLAIN <https://redis.io/commands/ft.explain>`_.\n        \"\"\"  # noqa\n        args, query_text = self._mk_query_args(query, query_params=query_params)\n        return self.execute_command(EXPLAIN_CMD, *args)\n\n    def explain_cli(self, query: Union[str, Query]):  # noqa\n        raise NotImplementedError(\"EXPLAINCLI will not be implemented.\")\n\n    def aggregate(\n        self,\n        query: Union[AggregateRequest, Cursor],\n        query_params: Optional[Dict[str, Union[str, int, float, bytes]]] = None,\n    ):\n        \"\"\"\n        Issue an aggregation query.\n\n        ### Parameters\n\n        **query**: This can be either an `AggregateRequest`, or a `Cursor`\n\n        An `AggregateResult` object is returned. You can access the rows from\n        its `rows` property, which will always yield the rows of the result.\n\n        For more information see `FT.AGGREGATE <https://redis.io/commands/ft.aggregate>`_.\n        \"\"\"  # noqa","sourceCodeStart":1405,"sourceCodeEnd":1441,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/commands/search/commands.py#L1405-L1441","documentation":"Raised unconditionally by explain_cli() — the method is a permanent stub. FT.EXPLAINCLI was removed from RediSearch and the Python client deliberately does not implement it. Any call fails immediately with NotImplementedError rather than emitting an unsupported command.","triggerScenarios":"Call client.explain_cli(query) on a search client — always raises, regardless of arguments.","commonSituations":"Porting old code or tutorials that reference EXPLAINCLI; assuming a CLI counterpart to explain() exists.","solutions":["Use client.explain(query) (FT.EXPLAIN) for the execution plan of a query.","Remove explain_cli calls from your code entirely.","Use client.profile(query) for combined execution + timing info."],"exampleFix":"// before\nclient.explain_cli(Query('@title:hello'))\n// after\nclient.explain(Query('@title:hello'))","handlingStrategy":"try-catch","validationCode":"def explain_or_profile(client, query, profile=False):\n    \"\"\"Use explain() or profile(); explain_cli() is intentionally unimplemented.\"\"\"\n    if profile:\n        return client.profile(query)\n    return client.explain(query)","typeGuard":"null","tryCatchPattern":"try:\n    client.explain_cli(query)\nexcept NotImplementedError:\n    plan = client.explain(query)  # supported equivalent","preventionTips":["Remove every explain_cli reference from your codebase — it is a permanent stub.","Use explain() for plans and profile() for plans + timing.","Add a grep CI check for 'explain_cli' to catch regressions."],"tags":["redis-search","notimplemented","explain","deprecated"],"analyzedSha":"da03cdc7e8731092b13e395605c3c1fb2de25de1","analyzedAt":"2026-08-04T20:26:47.563Z","schemaVersion":2}