Skip to content
Snippets Groups Projects
Unverified Commit 3e5d0a14 authored by Sabin Mendiguren's avatar Sabin Mendiguren Committed by GitHub
Browse files

Fixes for add and delete Methods in LanceDBVectorStore (#11825)

fix: Fixes for add and delete Methods in LanceDBVectorStore
parent d5bf7853
No related branches found
No related tags found
No related merge requests found
......@@ -154,6 +154,9 @@ class LanceDBVectorStore(BasePydanticVectorStore):
nodes: List[BaseNode],
**add_kwargs: Any,
) -> List[str]:
if not nodes:
_logger.debug("No nodes to add. Skipping the database operation.")
return []
data = []
ids = []
for node in nodes:
......@@ -186,7 +189,7 @@ class LanceDBVectorStore(BasePydanticVectorStore):
"""
table = self._connection.open_table(self.table_name)
table.delete('document_id = "' + ref_doc_id + '"')
table.delete('doc_id = "' + ref_doc_id + '"')
def query(
self,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment