Skip to content

Commit ecd5300

Browse files
committed
Regenerated the client
1 parent 5e3571e commit ecd5300

File tree

4 files changed

+14
-22
lines changed

4 files changed

+14
-22
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ license = "MIT"
77
edition = "2021"
88

99
[dependencies]
10+
tokio = {version = "1", features = ["full"]}
11+
fancy-regex = "^0.14"
1012
serde = { version = "^1.0", features = ["derive"] }
1113
serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] }
1214
serde_json = "^1.0"

README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22

33
❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-rust/tree/1.0.0
44

5-
6-
Сlient for Manticore Search.
7-
8-
95
For more information, please visit [https://manticoresearch.com/contact-us/](https://manticoresearch.com/contact-us/)
106

117
## Overview
128

139
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
1410

1511
- API version: 5.0.0
16-
- Package version: 1.0.0
17-
- Generator version: 7.3.0-SNAPSHOT
12+
- Package version: 1.1.0
13+
- Generator version: 7.14.0
1814
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
1915

2016
## Installation
@@ -48,6 +44,8 @@ Class | Method | HTTP request | Description
4844
- [AggComposite](docs/AggComposite.md)
4945
- [AggCompositeSource](docs/AggCompositeSource.md)
5046
- [AggCompositeTerm](docs/AggCompositeTerm.md)
47+
- [AggDateHistogram](docs/AggDateHistogram.md)
48+
- [AggHistogram](docs/AggHistogram.md)
5149
- [AggTerms](docs/AggTerms.md)
5250
- [Aggregation](docs/Aggregation.md)
5351
- [AutocompleteRequest](docs/AutocompleteRequest.md)
@@ -61,6 +59,7 @@ Class | Method | HTTP request | Description
6159
- [GeoDistanceLocationAnchor](docs/GeoDistanceLocationAnchor.md)
6260
- [Highlight](docs/Highlight.md)
6361
- [HighlightFieldOption](docs/HighlightFieldOption.md)
62+
- [HighlightFields](docs/HighlightFields.md)
6463
- [HitsHits](docs/HitsHits.md)
6564
- [InsertDocumentRequest](docs/InsertDocumentRequest.md)
6665
- [Join](docs/Join.md)
@@ -94,15 +93,6 @@ To get access to the crate's generated documentation, use:
9493
cargo doc --open
9594
```
9695

97-
## Compatibility table
98-
99-
| **manticoresearch-rust* | **Manticore Search** | **Compatibility** |
100-
| ------------------------| ----------------------------------- | ------------------------|
101-
| `manticoresearch-dev` | `dev` (latest development version) | ✅ Fully Compatible |
102-
| 1.0.0 or newer | 6.2.0 to 9.2.14 | ⚠️ Partially Compatible |
103-
| 1.0.0 or newer | 2.5.1 to 6.2.0 | ❗ Incompatible |
104-
105-
10696
## Getting started
10797

10898
```rust
@@ -186,6 +176,4 @@ async fn main() {
186176
};
187177

188178
}
189-
190-
191179
```

tests/search_api.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use manticoresearch::{
33
apis::{
44
{configuration::Configuration,IndexApi,IndexApiClient,SearchApi,SearchApiClient,UtilsApi,UtilsApiClient}
55
},
6-
models::{SearchRequest,SearchQuery,Highlight}
6+
models::{SearchRequest,SearchQuery,Highlight,HighlightFields}
77
};
88
use std::collections::HashMap;
99
use tokio;
@@ -40,12 +40,14 @@ async fn search_api_basic_requests() {
4040

4141
// Prepare search request
4242
let query = SearchQuery {
43-
query_string: Some(serde_json::json!("Star").into()),
43+
query_string: Some("Star".to_string()),
4444
..Default::default()
4545
};
4646

47+
let highlight_fields = HighlightFields::Array(vec!["title".to_string()]);
48+
4749
let highlight = Highlight {
48-
fields: Some(serde_json::json!(["title"]).into()),
50+
fields: Some(Box::new(highlight_fields)),
4951
..Default::default()
5052
};
5153

tests/utils_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ async fn utils_api_basic_requests() {
3131
assert!(res.is_ok(), "SHOW TABLES failed: {:?}", res.err());
3232

3333
let result = res.unwrap();
34-
let is_arr_response = matches!(result, SqlResponse::one_of_0 { .. });
34+
let is_arr_response = matches!(result, SqlResponse::SqlRawResponse { .. });
3535
assert!(is_arr_response == true);
3636

37-
if let SqlResponse::one_of_0(objs) = result {
37+
if let SqlResponse::SqlRawResponse(objs) = result {
3838
println!("value: {:#?}", objs[0]);
3939
}
4040
}

0 commit comments

Comments
 (0)