Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jan-niestadt opened this issue Jun 21, 2024 · 0 comments
Open

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

jan-niestadt opened this issue Jun 21, 2024 · 0 comments

Comments

@jan-niestadt
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant