{"record":{"id":"72d7fd6a80ca153e","repo":"mem0ai/mem0","slug":"valkey-search-module-is-not-available-please-ensu-72d7fd","errorCode":null,"errorMessage":"Valkey search module is not available. Please ensure Valkey is running with the search module enabled. The search module can be loaded using the --loadmodule option with the valkey-search library. For installation and setup instructions, refer to the Valkey Search documentation.","messagePattern":"Valkey search module is not available\\. Please ensure Valkey is running with the search module enabled\\. The search module can be loaded using the --loadmodule option with the valkey-search library\\. For installation and setup instructions, refer to the Valkey Search documentation\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mem0/vector_stores/valkey.py","lineNumber":212,"sourceCode":"        return cmd\n\n    def _create_index(self, embedding_model_dims):\n        \"\"\"\n        Create the search index with the specified schema.\n\n        Args:\n            embedding_model_dims (int): Dimensions for the vector embeddings.\n\n        Raises:\n            ValueError: If the search module is not available.\n            Exception: For other errors during index creation.\n        \"\"\"\n        # Check if the search module is available\n        try:\n            self.client.execute_command(\"FT._LIST\")\n        except ResponseError as e:\n            if \"unknown command\" in str(e).lower():\n                raise ValueError(\n                    \"Valkey search module is not available. Please ensure Valkey is running with the search module enabled. \"\n                    \"The search module can be loaded using the --loadmodule option with the valkey-search library. \"\n                    \"For installation and setup instructions, refer to the Valkey Search documentation.\"\n                )\n            else:\n                logger.exception(f\"Error checking search module: {e}\")\n                raise\n\n        # Check if the index already exists\n        try:\n            self.client.ft(self.collection_name).info()\n            return\n        except ResponseError as e:\n            if \"not found\" not in str(e).lower():\n                logger.exception(f\"Error checking index existence: {e}\")\n                raise\n\n        # Build and execute the index creation command","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/vector_stores/valkey.py#L194-L230","documentation":"Error \"Valkey search module is not available. Please ensure Valkey is running with the search module enabled. The search module can be loaded using the --loadmodule option with the valkey-search library. For installation and setup instructions, refer to the Valkey Search documentation.\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at mem0/vector_stores/valkey.py:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run Valkey with the search module loaded (--loadmodule valkey-search) or use a distribution that bundles it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}