-
Notifications
You must be signed in to change notification settings - Fork 86
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 filtering on deleteDocuments for Meilisearch v1.2 #1492
Add filtering on deleteDocuments for Meilisearch v1.2 #1492
Conversation
12f64f7
to
eada8aa
Compare
eada8aa
to
ce7d1a8
Compare
ce7d1a8
to
a0aa068
Compare
const url = `indexes/${this.uid}/${endpoint}` | ||
|
||
try { | ||
const task = await this.httpRequest.post(url, params) |
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.
Does the response of this post
method vary?
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.
I thought it could be only a task.
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.
It is always a task, but if the request fails it goes to the catch
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.
So, why do you need to create a new instance of the task? Since it is already returned?
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.
One is a plain object one is an instance of the Task Class
9c2ec7e
to
2e11694
Compare
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! 🎉 🎉 🌴
2e11694
to
37c550b
Compare
3c07b9e
to
c6f42e8
Compare
37c550b
to
d079011
Compare
d079011
to
7f927d0
Compare
44daf9e
to
bf30887
Compare
bf30887
to
1be343f
Compare
7f927d0
to
19746b1
Compare
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!
1501: Update version for the next release (v0.33.0) r=bidoubiwa 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 first parameter of the method `deleteDocuments(params)` now supports two different types. Either an array of document ID's or an object containing a `filter` field. The `filter` field works precisely like the `filter` field used on the `search` method (see [the docs on how to use filters](https://www.meilisearch.com/docs/learn/advanced/filtering#filter-basics)) and lets you determine which documents should be deleted.⚠️ Still, even being supported, the ability to receive an array of document ID's is deprecated and should be changed to an object containing the filter field. #1492 `@bidoubiwa` - `getDocuments(parameters: DocumentsQuery)`, now accepts a new `filter` field to filter the documents you'd like to fetch. The `filter` field works precisely like the `filter` field used on the `search` method (see [the docs on how to use filters](https://www.meilisearch.com/docs/learn/advanced/filtering#filter-basics)). #1493 `@bidoubiwa` These feature requires a Meilisearch server version greater than v1.2. Thanks again to `@bidoubiwa!` 🎉 1504: Update code-samples for v1.2 r=bidoubiwa a=meili-bot _This PR is auto-generated._ Update the code-samples.meilisearch.yml according to the [integration-guides issue](meilisearch/integration-guides#270) for more information and the complete description about what should be done here check that issue. This is the [central issue](meilisearch/integration-guides#261) about the Meilisearch release v1.2 in the integrations. Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Charlotte Vermandel <charlottevermandel@gmail.com>
As per the specification: meilisearch/specifications#236
deleteDocuments
now accepts two types of parameter.filter
field. NEWThe
filter
field works precisely like thefilter
field used on thesearch
method. See the docs on how to use filters.