You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(qdrant): Allow async-only initialization with hybrid search
Resolves an `AttributeError` that occurred when initializing
`QdrantVectorStore` with only an async client and `enable_hybrid=True`.
The fix implements a "lazy correction" strategy by deferring the
synchronous collection check from `__init__` to the first async
operation. This ensures the correct sparse encoders are configured
while respecting any user-provided custom functions.
New tests are added to validate the crash fix and the legacy
collection auto-correction.
Fixes#20002
Copy file name to clipboardExpand all lines: llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/llama_index/vector_stores/qdrant/base.py
+53-13Lines changed: 53 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -219,6 +219,10 @@ def __init__(
219
219
dense_vector_name=dense_vector_name,
220
220
sparse_vector_name=sparse_vector_name,
221
221
)
222
+
# Track if the user provided their own sparse functions. This is to prevent
223
+
# them from being overwritten by the lazy-init correction for async clients.
Copy file name to clipboardExpand all lines: llama-index-integrations/vector_stores/llama-index-vector-stores-qdrant/tests/test_vector_stores_qdrant.py
0 commit comments