Skip to content

Commit

Permalink
Merge #476 #477
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
meili-bors[bot] and meili-bot authored Jun 5, 2023
3 parents bb35328 + a4562b6 + 4902391 commit d63bec5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
24 changes: 20 additions & 4 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,18 @@ get_one_document_1: |-
.await
.unwrap();
get_documents_1: |-
let index = client
.index("movies");
let index = client.index("movies");
let documents: DocumentsResults = DocumentsQuery::new(&index)
.with_filter("genres = action")
.with_limit(2)
.execute::<Movies>()
.await
.unwrap();
get_documents_post_1: |-
let index = client.index("books");
let documents: DocumentsResults = DocumentsQuery::new(&index)
.with_filter("(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English")
.with_fields(["title", "genres", "rating", "language"])
.with_limit(2)
.execute::<Movies>()
.await
Expand Down Expand Up @@ -171,12 +180,19 @@ delete_one_document_1: |-
.delete_document(25684)
.await
.unwrap();
delete_documents_1: |-
delete_documents_by_batch_1: |-
let task: TaskInfo = client
.index("movies")
.delete_documents(&[23488, 153738, 437035, 363869])
.await
.unwrap();
delete_documents_by_filter_1: |-
let index = client.index("movies");
let task = DocumentDeletionQuery::new(&index)
.with_filter("genres = action OR genres = adventure")
.execute()
.await
.unwrap();
search_post_1: |-
let results: SearchResults<Movie> = client
.index("movies")
Expand Down Expand Up @@ -854,7 +870,7 @@ primary_field_guide_add_document_primary_key: |-
getting_started_add_documents_md: |-
```toml
[dependencies]
meilisearch-sdk = "0.23.2"
meilisearch-sdk = "0.24.0"
# futures: because we want to block on futures
futures = "0.3"
# serde: required if you are going to use documents
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "meilisearch-sdk"
version = "0.23.2"
version = "0.24.0"
authors = ["Mubelotix <[email protected]>"]
edition = "2018"
description = "Rust wrapper for the Meilisearch API. Meilisearch is a powerful, fast, open-source, easy to use and deploy search engine."
Expand All @@ -22,7 +22,7 @@ jsonwebtoken = { version = "8", default-features = false }
yaup = "0.2.0"
either = { version = "1.8.0", features = ["serde"] }
thiserror = "1.0.37"
meilisearch-index-setting-macro = { path = "meilisearch-index-setting-macro", version = "0.23.2" }
meilisearch-index-setting-macro = { path = "meilisearch-index-setting-macro", version = "0.24.0" }


[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To use `meilisearch-sdk`, add this to your `Cargo.toml`:

```toml
[dependencies]
meilisearch-sdk = "0.23.2"
meilisearch-sdk = "0.24.0"
```

The following optional dependencies may also be useful:
Expand Down
2 changes: 1 addition & 1 deletion README.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To use `meilisearch-sdk`, add this to your `Cargo.toml`:

```toml
[dependencies]
meilisearch-sdk = "0.23.2"
meilisearch-sdk = "0.24.0"
```

The following optional dependencies may also be useful:
Expand Down
2 changes: 1 addition & 1 deletion meilisearch-index-setting-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "meilisearch-index-setting-macro"
version = "0.23.2"
version = "0.24.0"
description = "Helper tool to generate settings of an Meilisearch index"
edition = "2021"
license = "MIT"
Expand Down

0 comments on commit d63bec5

Please sign in to comment.