Dear all at BaseX,
I don't understand the ADD/db:add behaviour when adding two documents with the same name : previous document is not replaced, but copied, and I did not find a way to correct, and delete only one of the documents, because they all have the same name...
So, thanks to the db:replace function, I wrote a updating function which emulates desired behaviour (that adds or replaces the document if it already exists in the database).
But if I try to insert the same document twice with this function (in the same updating query), I still get two documents in the database, because function is 'updating' and because of the pending update list...
Are db:XXX functions really 'updating' ? Is there a way to delete only one of the duplicated documents ?
Thank you again for your fantastic job.
Regards,
Fabrice ETANCHAUD Senior Software Engineer
edital
Berkenlaan 1
B-1831 Brussels, Belgium
+32 2 716 32 32 general
+32 2 716 32 20 fax
fetanchaud@edital.com
corsearch.com http://www.corsearch.com/ | edital.com http://www.edital.com/
Confidentiality Notice: This email and its attachments (if any) contain confidential information of the sender. The information is intended only for the use by the direct addressees of the original sender of this email. If you are not an intended recipient of the original sender (or responsible for delivering the message to such person), you are hereby notified that any review, disclosure, copying, distribution or the taking of any action in reliance of the contents of and attachments to this email is strictly prohibited. If you have received this email in error, please immediately notify the sender at the address shown herein and permanently delete any copies of this email (digital or paper) in your possession.
I don't understand the ADD/db:add behaviour when adding two documents with the same name : previous document is not replaced, but copied, and I did not find a way to correct, and delete only one of the documents, because they all have the same name...
Currently, to optimize performance, ADD does not check if a document already exists in the document.
So, thanks to the db:replace function, I wrote a updating function which emulates desired behaviour (that adds or replaces the document if it already exists in the database).
Have you already tried the REPLACE command?
Are db:XXX functions really 'updating' ? Is there a way to delete only one of the duplicated documents ?
If you want to update single documents, you should ensure that all documents have distinct names. This may either be enforced by using REPLACE, or by yourself..
Christian
basex-talk@mailman.uni-konstanz.de