-
Notifications
You must be signed in to change notification settings - Fork 84
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 method DeleteDocumentsByFilter for Meilisearch v1.2 #440
Conversation
d1a71a0
to
cbbf7a8
Compare
client: defaultClient, | ||
filterToApply: []string{"book_id"}, | ||
filterToDelete: "book_id = 123", | ||
documentsPtr: []docTestBooks{ |
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.
What does ptr mean?
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.
These are auto-generated tests, I think it's for pointers.
} | ||
if err := i.client.executeRequest(req); err != nil { | ||
return nil, VersionErrorHintMessage(err, &req) | ||
} | ||
return resp, nil |
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.
} | |
if err := i.client.executeRequest(req); err != nil { | |
return nil, VersionErrorHintMessage(err, &req) | |
} | |
return resp, nil | |
} | |
if err := i.client.executeRequest(req); err != nil { | |
return nil, VersionErrorHintMessage(err, &req) | |
} | |
return resp, nil |
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 can change it but all the others are formatted the same way
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!
441: Update version for the next release (v0.25.0) r=alallema 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 - Addition of the method `DeleteDocumentsByFilter`, this method takes an `interface{}` which allows you to send different types of filters (`string`, `[]string`, `[]interface{}{[]string{}}`, ...). 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). #440 `@alallema`⚠️ You must configure the attributes you want to filter using the `Index.UpdateFilterableAttributes()`.⚠️ Remember to **update your Meilisearch server to v1.2.0 or newer before** adopting it. - Add the ability to add `Filter` in the `DocumentsQuery`. When a query with a `filter` is sent to `getDocuments`, it will filter the documents like the `search` method. See [the docs on how to use filters](https://www.meilisearch.com/docs/learn/advanced/filtering#filter-basics). #439 `@alallema`⚠️ You must configure the attributes you want to filter using the `Index.UpdateFilterableAttributes()`.⚠️ Remember to **update your Meilisearch server to v1.2.0 or newer before** adopting it. Thanks again to `@alallema,` `@curquiza` ! 🎉 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Amélie <alallema@users.noreply.github.com>
As per the specification: meilisearch/specifications#236
Added method
DeleteDocumentsByFilter
, this method takes aninterface{}
which allows you to send different types of filters (string
,[]string
,[]interface{}{[]string{}}
, ...)The
filter
field works precisely like thefilter
field used on thesearch
method. See the docs on how to use filters.