Skip to content

Add delete_documents_with method for Meilisearch v1.2 #472

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

Merged

Conversation

bidoubiwa
Copy link
Contributor

@bidoubiwa bidoubiwa commented May 22, 2023

following this spec: meilisearch/specifications#236

  • Add a method index.delete_documents_with that lets you select a range of documents to delete based on the provided filters.

@bidoubiwa bidoubiwa force-pushed the delete-documents-by-filter-ms-v1.2 branch from 3c5fa48 to 034ad31 Compare May 22, 2023 14:36
@bidoubiwa bidoubiwa changed the title WIP Delete documents by filter Add delete_document_with method for Meilisearch v1.2 May 22, 2023
@bidoubiwa bidoubiwa changed the title Add delete_document_with method for Meilisearch v1.2 Add delete_documents_with method for Meilisearch v1.2 May 22, 2023
@bidoubiwa bidoubiwa requested review from irevoire and alallema May 22, 2023 15:00
@bidoubiwa bidoubiwa force-pushed the delete-documents-by-filter-ms-v1.2 branch from af5f408 to 48eb944 Compare May 23, 2023 10:58
@bidoubiwa bidoubiwa requested a review from irevoire May 23, 2023 10:59
@bidoubiwa bidoubiwa force-pushed the delete-documents-by-filter-ms-v1.2 branch from 48eb944 to c5a843f Compare May 23, 2023 12:11
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! 🎉

@bidoubiwa bidoubiwa force-pushed the delete-documents-by-filter-ms-v1.2 branch from c5a843f to 184d5cd Compare May 25, 2023 10:52
@bidoubiwa bidoubiwa force-pushed the delete-documents-by-filter-ms-v1.2 branch from 184d5cd to 977e9da Compare May 25, 2023 11:48
@bidoubiwa bidoubiwa force-pushed the delete-documents-by-filter-ms-v1.2 branch from 7b73ef0 to 0b5d7e9 Compare May 29, 2023 15:05
@bidoubiwa
Copy link
Contributor Author

bors merge

meili-bors bot added a commit that referenced this pull request May 31, 2023
472: Add delete_documents_with method for Meilisearch v1.2 r=bidoubiwa a=bidoubiwa

following this spec: meilisearch/specifications#236

- Add a method `index.delete_documents_with`  that lets you select a range of documents to delete based on the provided filters.


Co-authored-by: meili-bot <[email protected]>
Co-authored-by: Charlotte Vermandel <[email protected]>
Co-authored-by: cvermand <[email protected]>
@meili-bors
Copy link
Contributor

meili-bors bot commented May 31, 2023

Timed out.

@bidoubiwa
Copy link
Contributor Author

bors merge

meili-bors bot added a commit that referenced this pull request May 31, 2023
472: Add delete_documents_with method for Meilisearch v1.2 r=bidoubiwa a=bidoubiwa

following this spec: meilisearch/specifications#236

- Add a method `index.delete_documents_with`  that lets you select a range of documents to delete based on the provided filters.


Co-authored-by: meili-bot <[email protected]>
Co-authored-by: Charlotte Vermandel <[email protected]>
Co-authored-by: cvermand <[email protected]>
@meili-bors
Copy link
Contributor

meili-bors bot commented May 31, 2023

Build failed:

@brunoocasali brunoocasali merged commit 7db2d7b into bump-meilisearch-v1.2.0 May 31, 2023
@brunoocasali brunoocasali deleted the delete-documents-by-filter-ms-v1.2 branch May 31, 2023 18:29
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 <[email protected]>
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.

5 participants