{"record":{"id":"1692163513c0f4e5","repo":"RyanCodrai/turbovec","slug":"turboquantvectordb-only-supports-search-type-searc-169216","errorCode":null,"errorMessage":"TurboQuantVectorDb only supports search_type=SearchType.vector; got {value}. Use LanceDb / Chroma / etc. for keyword or hybrid search.","messagePattern":"TurboQuantVectorDb only supports search_type=SearchType\\.vector; got (.+?)\\. Use LanceDb / Chroma / etc\\. for keyword or hybrid search\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"turbovec-python/python/turbovec/agno.py","lineNumber":1034,"sourceCode":"    def search_type(self) -> SearchType:\n        return self._search_type\n\n    @search_type.setter\n    def search_type(self, value: SearchType) -> None:\n        \"\"\"Reject an unsupported search type on assignment, not only in\n        ``__init__``.\n\n        agno's ``Knowledge.search`` sets this attribute directly before\n        searching — ``self.vector_db.search_type = SearchType(search_type)``\n        — without consulting ``get_supported_search_types()``. As a plain\n        attribute that mutation silently succeeded and the store then\n        served vector-only results for a hybrid or keyword request, while\n        reporting ``search_type == hybrid`` afterwards (#502). Raising\n        here makes the unsupported request loud at the point it is made,\n        and matches what the constructor already does.\n        \"\"\"\n        if value != SearchType.vector:\n            raise ValueError(\n                f\"TurboQuantVectorDb only supports search_type=SearchType.vector; \"\n                f\"got {value}. Use LanceDb / Chroma / etc. for keyword \"\n                f\"or hybrid search.\"\n            )\n        self._search_type = value\n\n    def get_supported_search_types(self) -> List[SearchType]:\n        # Only vector. Keyword and hybrid would require an external BM25\n        # / lexical index that turbovec doesn't ship. Return shape\n        # mirrors LanceDb: a list of SearchType enum members (not their\n        # `.value` strings).\n        return [SearchType.vector]\n\n    # ---- VectorDb protocol: delete ----------------------------------------\n\n    def delete_by_id(self, id: str) -> bool:\n        if self._index is None:\n            return False","sourceCodeStart":1016,"sourceCodeEnd":1052,"githubUrl":"https://github.com/RyanCodrai/turbovec/blob/ccab9f325e6ce2a270a87daf01ae4e443bcf2d49/turbovec-python/python/turbovec/agno.py#L1016-L1052","documentation":"Raised by the search_type property setter when anything other than SearchType.vector is assigned. agno's Knowledge.search sets vector_db.search_type directly before searching, so a keyword or hybrid request would otherwise silently return vector-only results; this guard rejects the unsupported request loudly at the assignment site.","triggerScenarios":"Thrown at turbovec-python/python/turbovec/agno.py:1034 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use SearchType.vector (the only supported mode) or leave search_type unset.","Switch to a store that supports keyword/hybrid search (LanceDb, Chroma, etc.) when keyword or hybrid retrieval is required.","Catch the ValueError in the agent/Knowledge layer to detect a misconfigured knowledge base early."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ccab9f325e6ce2a270a87daf01ae4e443bcf2d49","analyzedAt":"2026-09-06T08:39:18.516Z","contentChangedAt":"2026-09-06T08:39:18.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}