Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integrations/qdrant/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"haystack-ai>=2.26.1",
"haystack-ai>=2.28.0",
"qdrant-client>=1.12.0"
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ def _initialize_client(self) -> None:
client_params = self._prepare_client_params()
# This step adds the api-key and User-Agent to metadata
self._client = qdrant_client.QdrantClient(**client_params)
# For in-memory stores: if the async client was already initialised,
# share its underlying collections dict so both clients see the same data.
if self.location == ":memory:" and self._async_client is not None:
self._client._client.collections = self._async_client._client.collections # type: ignore[attr-defined]
self._client._client.aliases = self._async_client._client.aliases # type: ignore[attr-defined]
return
Comment thread
anakin87 marked this conversation as resolved.
Outdated
# Make sure the collection is properly set up
self._set_up_collection(
self.index,
Expand All @@ -290,6 +296,12 @@ async def _initialize_async_client(self) -> None:
self._async_client = qdrant_client.AsyncQdrantClient(
**client_params,
)
# For in-memory stores: if the sync client was already initialised,
# share its underlying collections dict so both clients see the same data.
if self.location == ":memory:" and self._client is not None:
self._async_client._client.collections = self._client._client.collections # type: ignore[attr-defined]
self._async_client._client.aliases = self._client._client.aliases # type: ignore[attr-defined]
return
Comment thread
anakin87 marked this conversation as resolved.
Outdated
await self._set_up_collection_async(
self.index,
self.embedding_dim,
Expand Down
Loading
Loading