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

1029 delete specific indexes contribution collection #1032

Merged

Conversation

minump
Copy link
Collaborator

@minump minump commented Oct 20, 2022

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.

  • Immediately
  • Within a week
  • When possible

Type of changes

Please select a relevant option:

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Other (any another change that does not fall in one of the above categories.)

Checklist:

Please select all applicable options:

  • I have signed the Rokwire Contributor License Agreement (CLA). (Any contributor who is not an employee of the University of Illinois whose official duties include contributing to the Rokwire software, or who is not paid by the Rokwire project, needs to sign the CLA before their contribution can be accepted.)
  • I have updated the CHANGELOG.
  • I have read the Contributor Guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My change requires updating the documentation.
  • I have made necessary changes to the documentation.
  • I have added tests related to my changes.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

@minump minump requested a review from sandeep-ps as a code owner October 20, 2022 17:09
@minump minump linked an issue Oct 20, 2022 that may be closed by this pull request
@minump minump self-assigned this Oct 20, 2022
@minump minump requested a review from bingzhang October 20, 2022 17:09
@minump minump added the enhancement New feature or request label Oct 20, 2022
# 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']]
Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue created

sandeep-ps
sandeep-ps previously approved these changes Oct 26, 2022
Copy link
Collaborator

@sandeep-ps sandeep-ps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving.

bingzhang
bingzhang previously approved these changes Nov 1, 2022
@minump minump dismissed stale reviews from bingzhang and sandeep-ps via d13a35c November 1, 2022 17:18
@minump
Copy link
Collaborator Author

minump commented Nov 1, 2022

merging to develop
@sandeep-ps can you approve once more?

@minump minump merged commit 0f50179 into develop Nov 1, 2022
@minump minump deleted the 1029-delete-specific-indexes-contribution-collection branch November 1, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete specific indexes from contribution collection
3 participants