Skip to content

Commit 81418f2

Browse files
committed
fix: regen async client
1 parent fd9d548 commit 81418f2

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

qdrant_client/local/async_qdrant_local.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -882,14 +882,20 @@ async def update_collection(
882882
self,
883883
collection_name: str,
884884
sparse_vectors_config: Optional[Mapping[str, types.SparseVectorParams]] = None,
885+
metadata: Optional[types.Payload] = None,
885886
**kwargs: Any,
886887
) -> bool:
887888
_collection = self._get_collection(collection_name)
889+
updated = False
888890
if sparse_vectors_config is not None:
889891
for vector_name, vector_params in sparse_vectors_config.items():
890892
_collection.update_sparse_vectors_config(vector_name, vector_params)
891-
return True
892-
return False
893+
updated = True
894+
if metadata is not None:
895+
_collection.config.metadata.update(metadata)
896+
updated = True
897+
self._save()
898+
return updated
893899

894900
def _collection_path(self, collection_name: str) -> Optional[str]:
895901
if self.persistent:
@@ -921,6 +927,7 @@ async def create_collection(
921927
] = None,
922928
init_from: Optional[types.InitFrom] = None,
923929
sparse_vectors_config: Optional[Mapping[str, types.SparseVectorParams]] = None,
930+
metadata: Optional[types.Payload] = None,
924931
**kwargs: Any,
925932
) -> bool:
926933
if self.closed:
@@ -939,7 +946,9 @@ async def create_collection(
939946
os.makedirs(collection_path, exist_ok=True)
940947
collection = LocalCollection(
941948
rest_models.CreateCollection(
942-
vectors=vectors_config or {}, sparse_vectors=sparse_vectors_config
949+
vectors=vectors_config or {},
950+
sparse_vectors=sparse_vectors_config,
951+
metadata=metadata,
943952
),
944953
location=collection_path,
945954
force_disable_check_same_thread=self.force_disable_check_same_thread,

0 commit comments

Comments
 (0)