-
Notifications
You must be signed in to change notification settings - Fork 5
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
Delete documents by filter #9
Labels
Comments
@BlitzBanana can you add the labels Also, I put the exact same issue as the other repositories here, but I think the implementation will be simpler because the name |
BlitzBanana
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Jun 7, 2023
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, if you are a maintainer, please add any clarification and instructions about this issue.
Sorry if this is already wholly/partially implemented. Feel free to let me know about the state of this issue in the repo.
Related to meilisearch/integration-guides#261
New implementation
Related to:
It allows the user to use a filter expression to remove documents.
Since there is already a method called
deleteDocuments(uids)
in the SDKs, and this method is calling the routePOST /indexes/:index_uid/documents/delete-batch
, the requirements to implement the new way is to create a conditional internally to check the presence of the new parameterfilters
and then call the new methodPOST /indexes/:index_uid/documents/delete
.When the developer uses the old
ids
argument, it should keep calling the old implementation.This will avoid any silent failures the users may find.
For example, in the Ruby SDK:
Extra: Add inline documentation for the method, explaining the availability of the filter syntax only for Meilisearch v1.2 and newer.
Extra: Mark the
document_ids
parameter asdeprecated
. eg.@Deprecated('migration')
on Java/Dart, Obsolete on C#, etc. Add a library if necessary.Extra: Add a
try
/catch
to detect the error and give the user a hint about the possibility of a version mismatch between the SDK version and the instance version. Check this PR for an example in JavaScript: meilisearch/meilisearch-js#1492Extra: General recommendations:
Todo:
deleteDocuments
new behavior keeping the old behavior when possible.The text was updated successfully, but these errors were encountered: