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 get documents filter field for ms v1.2 #473

Merged

Conversation

bidoubiwa
Copy link
Contributor

@bidoubiwa bidoubiwa commented May 23, 2023

as per the specification: meilisearch/specifications#234

  • Add filter and the builder method with_filter on the DocumentQuery structure.

The filter field works precisely like the filter field used on the search method. See the docs on how to use filters.

@bidoubiwa bidoubiwa changed the base branch from main to bump-meilisearch-v1.2.0 May 23, 2023 15:14
@bidoubiwa bidoubiwa force-pushed the add_get_documents_filter_field_for_ms_v1.2 branch 3 times, most recently from 6cc03eb to 673e1d4 Compare May 23, 2023 15:23
@bidoubiwa bidoubiwa marked this pull request as ready for review May 23, 2023 15:27
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well Done 🎉
It's crazy that there was no MeilisearchCommunicationError until now 😳

src/indexes.rs Outdated Show resolved Hide resolved
src/indexes.rs Outdated Show resolved Hide resolved
src/indexes.rs Outdated Show resolved Hide resolved
@bidoubiwa bidoubiwa force-pushed the add_get_documents_filter_field_for_ms_v1.2 branch from 673e1d4 to 13e8576 Compare May 25, 2023 10:11
@bidoubiwa bidoubiwa requested a review from alallema May 25, 2023 10:15
@bidoubiwa bidoubiwa force-pushed the add_get_documents_filter_field_for_ms_v1.2 branch 3 times, most recently from fc5be60 to d8c927a Compare May 25, 2023 10:46
@bidoubiwa
Copy link
Contributor Author

I'v added a new test @alallema

test_get_documents_with_invalid_filter

Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

src/request.rs Show resolved Hide resolved
@bidoubiwa bidoubiwa force-pushed the add_get_documents_filter_field_for_ms_v1.2 branch 3 times, most recently from 7014e1f to 4a82f91 Compare May 25, 2023 16:46
@bidoubiwa bidoubiwa force-pushed the add_get_documents_filter_field_for_ms_v1.2 branch from 4a82f91 to bbb6322 Compare May 25, 2023 16:48
@bidoubiwa bidoubiwa merged commit cd3021c into bump-meilisearch-v1.2.0 May 29, 2023
@bidoubiwa bidoubiwa deleted the add_get_documents_filter_field_for_ms_v1.2 branch May 29, 2023 13:07
meili-bors bot added a commit that referenced this pull request Jun 5, 2023
476: Update version for the next release (v0.24.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

- Add a new `index.delete_documents_with(DocumentDeletionQuery)` method, which takes as a parameter a `DocumentDeletionQuery` struct. The struct has one builder method, `with_filter(filter: &str)`. The `filter` works precisely like the `filter` field used with 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. #472  `@bidoubiwa` 
- Add a new builder method `with_filter(filter: &str)` on `DocumentDeletionQuery` struct used by `index.get_documents_with`. The `filter` works precisely like the `filter` field used with 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 fetched. #473 `@bidoubiwa` 


These feature requires a Meilisearch server version greater than v1.2.

Thanks again to `@bidoubiwa!` 🎉

477: 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>
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

Successfully merging this pull request may close these issues.

2 participants