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 support for ignore_not_found=true parameter in document.delete() #65

Open
philippemilink opened this issue Feb 2, 2025 · 0 comments

Comments

@philippemilink
Copy link

philippemilink commented Feb 2, 2025

The documentation of the method to delete a single document states:

NOTE: When a document does not exist for the given id, an error is returned. To ignore this error and treat the deletion as success, you can send ignore_not_found=true parameter.

However, calling

client.collections['companies'].documents['124'].delete(ignore_not_found=True)

raises an exception: TypeError: Document.delete() got an unexpected keyword argument 'ignore_not_found'.

Could you add the support of this parameter, please?

EDIT: actually, this would also be needed for the delete by query function:

client.collections['companies'].documents.delete({'filter_by': 'num_employees:>100'})

because now it raises a typesense.exceptions.ObjectNotFound exception.

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

No branches or pull requests

1 participant