Skip to content

Commit 6643bc7

Browse files
authored
Merge branch 'main' into issue-503
2 parents a23fe34 + 9e57f3e commit 6643bc7

File tree

19 files changed

+176
-34
lines changed

19 files changed

+176
-34
lines changed

.code-samples.meilisearch.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ update_settings_1: |-
315315
"release_date:desc",
316316
"rank:desc"
317317
])
318-
.with_distinct_attribute("movie_id")
318+
.with_distinct_attribute(Some("movie_id"))
319319
.with_searchable_attributes([
320320
"title",
321321
"overview",
@@ -993,7 +993,7 @@ primary_field_guide_add_document_primary_key: |-
993993
getting_started_add_documents_md: |-
994994
```toml
995995
[dependencies]
996-
meilisearch-sdk = "0.26.0"
996+
meilisearch-sdk = "0.26.1"
997997
# futures: because we want to block on futures
998998
futures = "0.3"
999999
# serde: required if you are going to use documents
@@ -1641,5 +1641,8 @@ facet_search_3: |-
16411641
.facet_search("genres")
16421642
.with_facet_query("c")
16431643
.execute()
1644+
create_snapshot_1: |-
1645+
client
1646+
.create_snapshot()
16441647
.await
16451648
.unwrap();

.github/release-draft-template.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ replacers:
3333
replace: ''
3434
- search: '/(?:and )?@bors(?:\[bot\])?,?/g'
3535
replace: ''
36-
- search: '/(?:and )?@meili-bot,?/g'
36+
- search: '/(?:and )?@meili-bot(?:\[bot\])?,?/g'
37+
replace: ''
38+
- search: '/(?:and )?@meili-bors(?:\[bot\])?,?/g'
3739
replace: ''

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "meilisearch-sdk"
3-
version = "0.26.0"
3+
version = "0.26.1"
44
authors = ["Mubelotix <[email protected]>"]
55
edition = "2018"
66
description = "Rust wrapper for the Meilisearch API. Meilisearch is a powerful, fast, open-source, easy to use and deploy search engine."
@@ -18,10 +18,10 @@ log = "0.4"
1818
serde = { version = "1.0", features = ["derive"] }
1919
serde_json = "1.0"
2020
time = { version = "0.3.7", features = ["serde-well-known", "formatting", "parsing"] }
21-
yaup = "0.2.0"
21+
yaup = "0.3.1"
2222
either = { version = "1.8.0", features = ["serde"] }
2323
thiserror = "1.0.37"
24-
meilisearch-index-setting-macro = { path = "meilisearch-index-setting-macro", version = "0.26.0" }
24+
meilisearch-index-setting-macro = { path = "meilisearch-index-setting-macro", version = "0.26.1" }
2525
pin-project-lite = { version = "0.2.13", optional = true }
2626
reqwest = { version = "0.12.3", optional = true, default-features = false, features = ["rustls-tls", "http2", "stream"] }
2727
bytes = { version = "1.6", optional = true }
@@ -40,6 +40,7 @@ wasm-bindgen-futures = "0.4"
4040
[features]
4141
default = ["reqwest"]
4242
reqwest = ["dep:reqwest", "pin-project-lite", "bytes"]
43+
futures-unsend = []
4344

4445
[dev-dependencies]
4546
futures-await-test = "0.3"

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To use `meilisearch-sdk`, add this to your `Cargo.toml`:
5858

5959
```toml
6060
[dependencies]
61-
meilisearch-sdk = "0.26.0"
61+
meilisearch-sdk = "0.26.1"
6262
```
6363

6464
The following optional dependencies may also be useful:
@@ -244,6 +244,11 @@ Json output:
244244
By default, the SDK uses [`reqwest`](https://docs.rs/reqwest/latest/reqwest/) to make http calls.
245245
The SDK lets you customize the http client by implementing the `HttpClient` trait yourself and
246246
initializing the `Client` with the `new_with_client` method.
247+
You may be interested by the `futures-unsend` feature which lets you specify a non-Send http client.
248+
249+
#### Wasm support <!-- omit in TOC -->
250+
251+
The SDK supports wasm through reqwest. You'll need to enable the `futures-unsend` feature while importing it, though.
247252

248253
## 🌐 Running in the Browser with WASM <!-- omit in TOC -->
249254

README.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To use `meilisearch-sdk`, add this to your `Cargo.toml`:
5858

5959
```toml
6060
[dependencies]
61-
meilisearch-sdk = "0.26.0"
61+
meilisearch-sdk = "0.26.1"
6262
```
6363

6464
The following optional dependencies may also be useful:

examples/cli-app-with-awc/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ publish = false
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
meilisearch-sdk = { path = "../..", default-features = false }
10+
meilisearch-sdk = { path = "../..", default-features = false, features = ["futures-unsend"] }
1111
futures = "0.3"
1212
serde = { version = "1.0", features = ["derive"] }
1313
serde_json = "1.0"
1414
lazy_static = "1.4.0"
1515
awc = "3.4"
1616
async-trait = "0.1.51"
1717
tokio = { version = "1.27.0", features = ["full"] }
18-
yaup = "0.2.0"
18+
yaup = "0.3.0"
1919
tokio-util = { version = "0.7.10", features = ["full"] }
2020
actix-rt = "2.9.0"
21+
anyhow = "1.0.82"

examples/cli-app-with-awc/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ impl HttpClient for AwcClient {
5959
.content_type(content_type)
6060
.send_stream(stream)
6161
.await
62-
.map_err(|err| Error::Other(Box::new(err)))?
62+
.map_err(|err| Error::Other(anyhow::anyhow!(err.to_string()).into()))?
6363
} else {
6464
request
6565
.send()
6666
.await
67-
.map_err(|err| Error::Other(Box::new(err)))?
67+
.map_err(|err| Error::Other(anyhow::anyhow!(err.to_string()).into()))?
6868
};
6969

7070
let status = response.status().as_u16();
7171
let mut body = String::from_utf8(
7272
response
7373
.body()
7474
.await
75-
.map_err(|err| Error::Other(Box::new(err)))?
75+
.map_err(|err| Error::Other(anyhow::anyhow!(err.to_string()).into()))?
7676
.to_vec(),
7777
)
78-
.map_err(|err| Error::Other(Box::new(err)))?;
78+
.map_err(|err| Error::Other(anyhow::anyhow!(err.to_string()).into()))?;
7979

8080
if body.is_empty() {
8181
body = "null".to_string();

examples/cli-app/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ futures = "0.3"
1212
serde = { version="1.0", features = ["derive"] }
1313
serde_json = "1.0"
1414
lazy_static = "1.4.0"
15-
yaup = "0.2.0"
15+
yaup = "0.3.0"

examples/web_app/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ serde_json = "1.0"
1313
wasm-bindgen = "0.2"
1414
wasm-bindgen-futures = "0.4.18"
1515
yew = {version="0.21", features = ["csr"]}
16-
meilisearch-sdk = {path="../.."}
16+
meilisearch-sdk = { path="../..", features = ["futures-unsend"] }
1717
lazy_static = "1.4"
1818
serde = {version="1.0", features=["derive"]}
1919
web-sys = "0.3"

examples/web_app_graphql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ meilisearch-sdk = "0.24.3"
2323
serde = { version = "1.0.192", features = ["derive"] }
2424
serde_json = "1.0.108"
2525
thiserror = "1.0.51"
26-
validator = { version = "0.17.0", features = ["derive"] }
26+
validator = { version = "0.18.1", features = ["derive"] }

0 commit comments

Comments
 (0)