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

Add ID to Label schema #727

Merged
merged 1 commit into from
Jan 12, 2021
Merged

Add ID to Label schema #727

merged 1 commit into from
Jan 12, 2021

Conversation

tholor
Copy link
Member

@tholor tholor commented Jan 12, 2021

If we add new labels to elasticsearch and update_existing_documents=True for the DocumentStore, we will use elastic's _op_type create instead of index. However, this one requires us to supply an ID. Otherwise it crashes with:

elasticsearch.exceptions.RequestError: RequestError(400, 'action_request_validation_exception', 'Validation Failed: 1: an id must be provided if version type or value are set;')

This PR adds an ID field to the Label class in a similar way as we did with Document

@tholor tholor requested a review from tanaysoni January 12, 2021 08:40
@tholor tholor merged commit b6e64ca into master Jan 12, 2021
@tholor tholor deleted the add_id_for_label branch January 12, 2021 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants