{"record":{"id":"a71bfeef84c1cac0","repo":"RyanCodrai/turbovec","slug":"turboquantvectorstore-does-not-support-query-mode","errorCode":null,"errorMessage":"TurboQuantVectorStore does not support query mode {query.mode!r}. Only VectorStoreQueryMode.DEFAULT is supported — MMR / SVM / hybrid modes need access to full-precision vectors which turbovec discards after quantization. Maintain a parallel store with full vectors if you need a non-default scoring mode.","messagePattern":"TurboQuantVectorStore does not support query mode (.+?)\\. Only VectorStoreQueryMode\\.DEFAULT is supported — MMR / SVM / hybrid modes need access to full-precision vectors which turbovec discards after quantization\\. Maintain a parallel store with full vectors if you need a non-default scoring mode\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"turbovec-python/python/turbovec/llama_index.py","lineNumber":795,"sourceCode":"            # must be present in the metadata value (which is typically\n            # a list — tag-set matching).\n            return all(t in value for t in target)\n        if op == FilterOperator.ANY:\n            return any(t in value for t in target)\n        raise NotImplementedError(\n            f\"filter operator {op!r} not supported by TurboQuantVectorStore\"\n        )\n\n    def query(self, query: VectorStoreQuery, **_: Any) -> VectorStoreQueryResult:\n        # MMR / SVM / LINEAR_REGRESSION / HYBRID etc. all need access to\n        # full-precision vectors (for pairwise diversity, learned scoring,\n        # or sparse-dense fusion). turbovec discards full precision after\n        # quantization, so any non-DEFAULT mode is unsupportable here.\n        # Raise loudly instead of silently treating it as DEFAULT, which\n        # the previous impl did and which let callers think they were\n        # getting e.g. MMR diversity when they were not.\n        if query.mode != VectorStoreQueryMode.DEFAULT:\n            raise NotImplementedError(\n                f\"TurboQuantVectorStore does not support query mode \"\n                f\"{query.mode!r}. Only VectorStoreQueryMode.DEFAULT is \"\n                \"supported — MMR / SVM / hybrid modes need access to \"\n                \"full-precision vectors which turbovec discards after \"\n                \"quantization. Maintain a parallel store with full vectors \"\n                \"if you need a non-default scoring mode.\"\n            )\n        if query.query_embedding is None:\n            raise ValueError(\n                \"TurboQuantVectorStore requires a pre-computed query_embedding \"\n                \"(is_embedding_query=True).\"\n            )\n        qvec = np.asarray(query.query_embedding, dtype=np.float32)\n        if qvec.ndim == 1:\n            qvec = qvec[None, :]\n        # Cosine mode: normalize the query so the raw inner product\n        # against unit node vectors is true cosine similarity.\n        if self._similarity == COSINE:","sourceCodeStart":777,"sourceCodeEnd":813,"githubUrl":"https://github.com/RyanCodrai/turbovec/blob/ccab9f325e6ce2a270a87daf01ae4e443bcf2d49/turbovec-python/python/turbovec/llama_index.py#L777-L813","documentation":"TurboQuantVectorStore only supports VectorStoreQueryMode.DEFAULT (top-k similarity). Modes like MMR, SVM, LINEAR_REGRESSION, and HYBRID need full-precision vectors, which quantization discards, so the store raises loudly instead of silently degrading to DEFAULT search.","triggerScenarios":"Calling query() with VectorStoreQuery(mode=VectorStoreQueryMode.MMR/SVM/HYBRID/...) — typically via retrievers configured with vector_store_query_mode set.","commonSituations":"Configuring a retriever with query_mode=\"mmr\" for diversity; hybrid search recipes ported from other stores; accidentally inherited retriever settings.","solutions":["Remove the query_mode setting so the retriever uses DEFAULT","Maintain a parallel full-precision store (e.g. SimpleVectorStore) for non-default query modes","Implement MMR-style reranking yourself on the DEFAULT results"],"exampleFix":"// before\nretriever = index.as_retriever(vector_store_query_mode=\"mmr\")\n// after\nretriever = index.as_retriever()  # DEFAULT mode","handlingStrategy":"validation","validationCode":"from llama_index.core.vector_stores.types import VectorStoreQueryMode\nif q.mode != VectorStoreQueryMode.DEFAULT:\n    raise ValueError(f\"TurboQuantVectorStore supports only DEFAULT, got {q.mode}\")","typeGuard":null,"tryCatchPattern":"try:\n    result = store.query(q)\nexcept NotImplementedError as e:\n    if \"query mode\" in str(e):\n        q.mode = VectorStoreQueryMode.DEFAULT\n        result = store.query(q)\n    else:\n        raise","preventionTips":["Never set vector_store_query_mode on retrievers backed by this store","Keep turbovec-backed indexes and full-precision indexes separate per use case","Document that quantized stores are DEFAULT-mode only in team guidelines"],"tags":["python","llama-index","query-mode","not-implemented"],"backgroundTag":"unsupported-operation","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"}