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

refactor: rename mvi parameter ids to filter on get/delete items #435

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

malandis
Copy link
Contributor

@malandis malandis commented Feb 12, 2024

To standardize how we select items in get item batch, get item metadata batch, and delete item batch, we use the term filter in methods, whether selecting by ids or filter expression.

@malandis malandis requested a review from a team February 12, 2024 19:56
@@ -107,7 +107,7 @@ def search(client: PreviewVectorIndexClient, index_name: str) -> None:
def delete_items(client: PreviewVectorIndexClient, index_name: str) -> None:
item_ids_to_delete = ["test_item_1", "test_item_3"]
_logger.info(f"Deleting items: {item_ids_to_delete}")
delete_response = client.delete_item_batch(index_name, ids=item_ids_to_delete)
delete_response = client.delete_item_batch(index_name, filter=item_ids_to_delete)
Copy link
Contributor

Choose a reason for hiding this comment

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

just wondering, why filter and not filters? Looks like this is an array

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In a coming PR this will accept a (single) filter expression or (for convenience) a list of ids to select.

Copy link
Contributor

@bruuuuuuuce bruuuuuuuce left a comment

Choose a reason for hiding this comment

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

:shipit:

@malandis malandis merged commit dd0156f into main Feb 12, 2024
20 checks passed
@malandis malandis deleted the refactor/mvi-change-ids-parameter-name branch February 12, 2024 20:41
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.

2 participants