Replies: 1 comment 1 reply
-
We are also encountering this issue and would like to see this clarified! @metadaddy were you able to gain any understanding since you posted? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
Opening a discussion, because I'm not sure if the current LanceDB implementation is incorrect, or there are reasons for it working this way.
Current Situation
mode
in theLanceDB
constructor is"overwrite"
, so I just dovectorstore = LanceDB(embedding=...)
.add_documents()
, but I find that each call overwrites the data written in previous calls.mode="append"
in theLanceDB
constructor to haveadd_documents()
actually add documents without deleting existing data.This is quite unintuitive. With the default
mode
of"overwrite"
, I would expect any existing database to be overwritten, then successiveadd_documents()
calls to actually add documents, rather than removing existing documents then adding the new ones.To achieve my goal, I have to either:
LanceDB
withmode="append"
, orLanceDB
withmode="overwrite"
, calladd_documents()
once, then create anotherLanceDB
instance withmode="append"
for subsequentadd_documents()
calls.Further, if I later create another
LanceDB
with"overwrite"
mode, then dovectorstore.get_table().count_rows()
, there is data there. Existing data is not deleted until the firstadd_documents()
call.How I think it should work
mode
on creating aLanceDB
object should be"append"
, rather than"overwrite"
, or perhaps there should be no default at all. It's better to unexpectedly append to existing data than unexpectedly replace it.LanceDB
object withmode="overwrite"
should delete the existing database.add_documents()
should always add documents, rather than replacing the existing data.System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
Beta Was this translation helpful? Give feedback.
All reactions