Skip to content

Add remove_all_indexes - #310

Merged
bovlb merged 2 commits into
developfrom
remove-all-indexes
Sep 28, 2023
Merged

bovlb merged 2 commits into
developfrom
remove-all-indexes

Conversation

@bovlb

@bovlb bovlb commented Sep 26, 2023

Copy link
Copy Markdown
Contributor

This method will be useful in improving the performance of coco ingestion.

Comment thread aperturedb/Utils.py Resolved

@gsaluja9 gsaluja9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good.

@bovlb
bovlb merged commit 70fb103 into develop Sep 28, 2023
@bovlb
bovlb deleted the remove-all-indexes branch September 28, 2023 18:05
Comment thread aperturedb/Utils.py

Note that this only removes populated indexes.
"""
def find_indexes(schema):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry this was an oversight. There's already a similar implementation

def get_existing_indices(self):

and remove index itself exists in utils:

def _remove_index(self, index_type, class_name, property_key):

Can this all be reconciled? @bovlb

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Utils might be a good place to put this in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll consolidate get_existing_indices with find_indexes.
I didn't want to use _remove_index because it generates a query per index.

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.

3 participants