Skip to content

Commit

Permalink
qdrant migrate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnJyong committed Sep 20, 2023
1 parent e1fb2b2 commit ae4ed10
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/core/index/vector_index/qdrant_vector_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,20 @@ def delete_by_group_id(self, group_id: str) -> None:
],
))

def delete(self) -> None:
vector_store = self._get_vector_store()
vector_store = cast(self._get_vector_store_class(), vector_store)

from qdrant_client.http import models
vector_store.del_texts(models.Filter(
must=[
models.FieldCondition(
key="group_id",
match=models.MatchValue(value=self.dataset.id),
),
],
))

def _is_origin(self):
if self.dataset.index_struct_dict:
class_prefix: str = self.dataset.index_struct_dict['vector_store']['class_prefix']
Expand Down

0 comments on commit ae4ed10

Please sign in to comment.