11 Apr
2019
11 Apr
'19
9:13 a.m.
Hi, this may seem like a dumb question, but how can I add & replace a number of documents in a database? I have a directory with some files that I want to import. Some of the documents may already exist in the database. If I use the db:replace('db', '', '/path/to/my/files') function it adds the missing docs and overwrites the existing ones. But it also deletes all other documents from the database. I cannot work with db:add() because it does not overwrite existing docs. Any suggestions? Best regards Johannes