-
Notifications
You must be signed in to change notification settings - Fork 44
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 #438
Delete documents by filter #438
Conversation
This will increase the DX when the user tries to use a route method that are not defined in the current Meilisearch instance they are using.
@bidoubiwa here on the Ruby SDK, the Meili errors are always |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My approval cannot count as an official one, but I've checked the method and looks good to me
It's also a good addition to improve the error message, definitely useful 👌
f002359
to
307c268
Compare
@bidoubiwa I'm going to merge this, and also the get_documents, since I addressed all of your concerns ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
440: Update version for the next release (v0.24.0) r=brunoocasali a=meili-bot Release CHANGELOG: This version introduces features released on Meilisearch v1.2.0 🎉 Check out the changelog of [Meilisearch v1.2.0](https://github.com/meilisearch/meilisearch/releases/tag/v1.2.0) for more information on the changes.⚠️ If you want to adopt new features of this release, **update the Meilisearch server** to the according version. ### 🚀 Enhancements - The method `delete_documents()` now supports a different behavior. This method could take an `options` hash containing a `filter:` key/value object to filter the documents or a simple array or single value as usual.⚠️ Still, even being supported, the ability to receive other types than a hash is deprecated and should be changed to a filter. Please use `filter` instead. #438 `@brunoocasali` - When a query with a `filter` key is sent to `get_documents(options = {})` it will filter the documents like the `search` method. This feature requires a Meilisearch server version greater than v1.2. See [the docs on how to use filters](https://www.meilisearch.com/docs/learn/advanced/filtering#filter-basics). #439 `@brunoocasali` Thanks again to `@brunoocasali!` 🎉 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com>
The method
delete_documents()
now supports a different behavior. This method could take anoptions
hash containing afilter:
key/value object to filter the documents or a simple array or single value as usual.Introduce a way of handling the exceptions before being raised to be able to add a custom message where we give the user a hint of where the error is (version related).
This is how the error will look like when the user tries to call a delete by filters when using an old Meilisearch version: