BlackLab icon indicating copy to clipboard operation
BlackLab copied to clipboard

Don't allow adding a document with the same pid twice

Open jan-niestadt opened this issue 8 months ago • 0 comments

Right now, BlackLab doesn't check the configured pid field when adding documents. So it's possible to add a document twice; two copies will exist in BlackLab that have the same pid. Behaviour when e.g. retrieving this document by pid is undetermined; likely one of the copies will be chosen more or less at random.

Instead, BlackLab should ideally detect the situation and either reject the document (requiring an explicit delete of the existing document first), or (probably more helpful) replace the existing document with the new version. We could even make the behaviour configurable.

jan-niestadt avatar Jun 21 '24 10:06 jan-niestadt