-
Notifications
You must be signed in to change notification settings - Fork 4
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
1029 delete specific indexes contribution collection #1032
1029 delete specific indexes contribution collection #1032
Conversation
# get all indexes except id and text index | ||
coll_contribution_old_indexes = [index for index in coll_contribution_indexes if index not in ['_id_', 'text_index']] | ||
# get old indexes | ||
coll_contribution_old_indexes = [index for index in coll_contribution_indexes if index in ['name', 'capabilities.name', 'talents.name']] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested using Robo 3T that the name index is getting removed. Thanks.
In the future, as part of code cleanup, I think these lines of code could be converted to an init_db function called when the extractor starts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue created
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving.
merging to develop |
Description
Delete old indexes from contribution collection.
Get all indexes in the contribution collection. Delete indexes with names ['name', 'capabilities.name', 'talents.name'].
Fixes #1029
Review Time Estimate
Please give your idea of how soon this pull request needs to be reviewed by selecting one of the options below. This can be based on the criticality of the issue at hand and/or other relevant factors.
Type of changes
Please select a relevant option:
Checklist:
Please select all applicable options: