Skip to content

Send documents as jsonlines for POST and PUT requests #306

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Also, the WASM example compilation should be checked:

```bash
rustup target add wasm32-unknown-unknown
cargo check --example web_app --target wasm32-unknown-unknown --features=sync
cargo check -p web_app --target wasm32-unknown-unknown
```

Each PR should pass the tests to be accepted.
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "meilisearch-sdk"
version = "0.17.0"
version = "0.19.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 @@ -19,10 +19,12 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
time = { version = "0.3.7", features = ["serde-well-known", "formatting", "parsing"] }
jsonwebtoken = { version = "8", default-features = false }
yaup = "0.2.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
futures = "0.3"
isahc = { version = "1.0", features = ["http2", "text-decoding"], default_features = false }
uuid = { version = "1.1.2", features = ["v4"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.47"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To use `meilisearch-sdk`, add this to your `Cargo.toml`:

```toml
[dependencies]
meilisearch-sdk = "0.17.0"
meilisearch-sdk = "0.19.0"
```

The following optional dependencies may also be useful:
Expand Down Expand Up @@ -224,7 +224,7 @@ Json output:
],
"offset": 0,
"limit": 20,
"nbHits": 1,
"estimatedTotalHits": 1,
"processingTimeMs": 0,
"query": "wonder"
}
Expand All @@ -242,7 +242,7 @@ WARNING: `meilisearch-sdk` will panic if no Window is available (ex: Web extensi

## 🤖 Compatibility with Meilisearch

This package only guarantees the compatibility with the [version v0.27.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.27.0).
This package only guarantees the compatibility with the [version v0.28.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.28.0).

## ⚙️ Development Workflow and Contributing

Expand Down
4 changes: 2 additions & 2 deletions README.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To use `meilisearch-sdk`, add this to your `Cargo.toml`:

```toml
[dependencies]
meilisearch-sdk = "0.17.0"
meilisearch-sdk = "0.19.0"
```

The following optional dependencies may also be useful:
Expand Down Expand Up @@ -97,7 +97,7 @@ WARNING: `meilisearch-sdk` will panic if no Window is available (ex: Web extensi

## 🤖 Compatibility with Meilisearch

This package only guarantees the compatibility with the [version v0.27.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.27.0).
This package only guarantees the compatibility with the [version v0.28.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.28.0).

## ⚙️ Development Workflow and Contributing

Expand Down
4 changes: 2 additions & 2 deletions examples/web_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Rust source files are compiled into WebAssembly and so can be readable by th
If you only want to check if this example compiles, you can run:

```console
cargo build --example web_app
cargo build
```

## Building
Expand All @@ -23,7 +23,7 @@ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
```

```console
wasm-pack build examples/web_app/ --target=web --no-typescript
wasm-pack build . --target=web --no-typescript
```

The compiled files will be stored in the `examples/web_app/pkg` folder.
Expand Down
5 changes: 1 addition & 4 deletions examples/web_app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ mod document;
use crate::document::{display, Crate};

lazy_static! {
static ref CLIENT: Client = Client::new(
"https://finding-demos.meilisearch.com",
"2b902cce4f868214987a9f3c7af51a69fa660d74a785bed258178b96e3480bb3",
);
static ref CLIENT: Client = Client::new("http://localhost:7700", "masterKey",);
}

struct Model {
Expand Down
4 changes: 2 additions & 2 deletions meilisearch-test-macro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async fn test_get_tasks() -> Result<(), Error> {

let tasks = index.get_tasks().await?;
// The only task is the creation of the index
assert_eq!(status.len(), 1);
assert_eq!(status.results.len(), 1);

index.delete()
.await?
Expand All @@ -52,7 +52,7 @@ With this macro, all these problems are solved. See a rewrite of this test:
async fn test_get_tasks(index: Index, client: Client) -> Result<(), Error> {
let tasks = index.get_tasks().await?;
// The only task is the creation of the index
assert_eq!(status.len(), 1);
assert_eq!(status.results.len(), 1);
}
```

Expand Down
Loading