Reset function for VectorDBs (#2584)
This commit is contained in:
@@ -199,3 +199,9 @@ class OpenSearchDB(VectorStoreBase):
|
||||
for hit in response["hits"]["hits"]
|
||||
]
|
||||
]
|
||||
|
||||
def reset(self):
|
||||
"""Reset the index by deleting and recreating it."""
|
||||
logger.warning(f"Resetting index {self.collection_name}...")
|
||||
self.delete_col()
|
||||
self.create_index()
|
||||
|
||||
Reference in New Issue
Block a user