diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100755
index 0000000..8558590
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,23 @@
+name: Publishing
+
+on:
+ push:
+ branches:
+ - test
+
+
+jobs:
+ test:
+ uses: ./.github/workflows/test.yml
+ publish:
+ name: Publish the client to the public registry
+ needs: test
+ runs-on: ubuntu-latest
+ env:
+ CRATES_IO: ${{ secrets.CRATES_IO }}
+
+ steps:
+ - uses: actions/checkout@v4
+ - run: |
+ echo "Publishing to crates.io"
+ cargo login $CRATES_IO
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100755
index 0000000..ac7ba1f
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,30 @@
+name: tests
+
+on: [workflow_call]
+
+jobs:
+ test:
+
+ name: unit tests
+ runs-on: ubuntu-latest
+
+ services:
+ manticoresearch-manticore:
+ image: manticoresearch/manticore:dev
+ env:
+ EXTRA: 1
+ ports:
+ - 9308:9308
+
+ strategy:
+ matrix:
+ BUILD_TARGET: [release]
+ outputs:
+ release_built: ${{ steps.set-output.outputs.release_built }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Build binaries in "${{ matrix.BUILD_TARGET }}" mode
+ run: cargo build --profile ${{ matrix.BUILD_TARGET }}
+ - name: Run tests in "${{ matrix.BUILD_TARGET }}" mode
+ run: cargo test --profile ${{ matrix.BUILD_TARGET }} -- --show-output
+
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..6aa1064
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/target/
+**/*.rs.bk
+Cargo.lock
diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore
new file mode 100755
index 0000000..7484ee5
--- /dev/null
+++ b/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
new file mode 100755
index 0000000..331d0a2
--- /dev/null
+++ b/.openapi-generator/FILES
@@ -0,0 +1,100 @@
+.gitignore
+.openapi-generator-ignore
+.travis.yml
+Cargo.toml
+README.md
+docs/AggComposite.md
+docs/AggCompositeSource.md
+docs/AggCompositeTerm.md
+docs/AggTerms.md
+docs/Aggregation.md
+docs/AutocompleteRequest.md
+docs/BoolFilter.md
+docs/BulkResponse.md
+docs/DeleteDocumentRequest.md
+docs/DeleteResponse.md
+docs/ErrorResponse.md
+docs/FulltextFilter.md
+docs/GeoDistance.md
+docs/GeoDistanceLocationAnchor.md
+docs/Highlight.md
+docs/HighlightFieldOption.md
+docs/HitsHits.md
+docs/IndexApi.md
+docs/InsertDocumentRequest.md
+docs/Join.md
+docs/JoinCond.md
+docs/JoinOn.md
+docs/KnnQuery.md
+docs/Match.md
+docs/MatchAll.md
+docs/PercolateRequest.md
+docs/PercolateRequestQuery.md
+docs/QueryFilter.md
+docs/Range.md
+docs/ReplaceDocumentRequest.md
+docs/ResponseError.md
+docs/ResponseErrorDetails.md
+docs/SearchApi.md
+docs/SearchQuery.md
+docs/SearchRequest.md
+docs/SearchResponse.md
+docs/SearchResponseHits.md
+docs/SourceRules.md
+docs/SqlObjResponse.md
+docs/SqlResponse.md
+docs/SuccessResponse.md
+docs/UpdateDocumentRequest.md
+docs/UpdateResponse.md
+docs/UtilsApi.md
+git_push.sh
+src/apis/client.rs
+src/apis/configuration.rs
+src/apis/index_api.rs
+src/apis/mod.rs
+src/apis/request.rs
+src/apis/search_api.rs
+src/apis/utils_api.rs
+src/lib.rs
+src/models/_match.rs
+src/models/agg_composite.rs
+src/models/agg_composite_source.rs
+src/models/agg_composite_term.rs
+src/models/agg_terms.rs
+src/models/aggregation.rs
+src/models/autocomplete_request.rs
+src/models/bool_filter.rs
+src/models/bulk_response.rs
+src/models/delete_document_request.rs
+src/models/delete_response.rs
+src/models/error_response.rs
+src/models/fulltext_filter.rs
+src/models/geo_distance.rs
+src/models/geo_distance_location_anchor.rs
+src/models/highlight.rs
+src/models/highlight_field_option.rs
+src/models/hits_hits.rs
+src/models/insert_document_request.rs
+src/models/join.rs
+src/models/join_cond.rs
+src/models/join_on.rs
+src/models/knn_query.rs
+src/models/match_all.rs
+src/models/mod.rs
+src/models/percolate_request.rs
+src/models/percolate_request_query.rs
+src/models/query_filter.rs
+src/models/range.rs
+src/models/replace_document_request.rs
+src/models/response_error.rs
+src/models/response_error_details.rs
+src/models/search_query.rs
+src/models/search_request.rs
+src/models/search_response.rs
+src/models/search_response_hits.rs
+src/models/source_rules.rs
+src/models/sql_obj_response.rs
+src/models/sql_response.rs
+src/models/success_response.rs
+src/models/update_document_request.rs
+src/models/update_response.rs
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
new file mode 100755
index 0000000..fff4bdd
--- /dev/null
+++ b/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.3.0-SNAPSHOT
\ No newline at end of file
diff --git a/.project b/.project
new file mode 100644
index 0000000..30f13c9
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+
+
+ manticoresearch-rust
+
+
+
+
+
+
+
+
diff --git a/.travis.yml b/.travis.yml
new file mode 100755
index 0000000..22761ba
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1 @@
+language: rust
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100755
index 0000000..53831ca
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,22 @@
+[package]
+name = "manticoresearch"
+version = "1.0.0"
+authors = ["info@manticoresearch.com"]
+description = "Сlient for Manticore Search. "
+license = "MIT"
+edition = "2021"
+
+[dependencies]
+tokio = {version = "1", features = ["full"]}
+fancy-regex = "^0.14"
+serde = { version = "^1.0", features = ["derive"] }
+serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] }
+serde_json = "^1.0"
+serde_repr = "^0.1"
+url = "^2.5"
+hyper = { version = "^1.3.1", features = ["full"] }
+hyper-util = { version = "0.1.5", features = ["client", "client-legacy", "http1", "http2"] }
+http-body-util = { version = "0.1.2" }
+http = "~0.2"
+base64 = "~0.7.0"
+futures = "^0.3"
diff --git a/LICENSE b/LICENSE.txt
old mode 100644
new mode 100755
similarity index 92%
rename from LICENSE
rename to LICENSE.txt
index 5cf4d38..57189b7
--- a/LICENSE
+++ b/LICENSE.txt
@@ -1,6 +1,6 @@
-MIT License
+The MIT License (MIT)
-Copyright (c) 2025 Manticore Search
+Copyright (c) 2020-2025, Manticore Software LTD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index 416dd7c..f7463bf
--- a/README.md
+++ b/README.md
@@ -1,4 +1,190 @@
-# manticoresearch-rust
-Rust client for Manticore Search
+# Manticore Rust client
-Coming soon.
+❗ 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
+
+
+Сlient for Manticore Search.
+
+
+For more information, please visit [https://manticoresearch.com/contact-us/](https://manticoresearch.com/contact-us/)
+
+## Overview
+
+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.
+
+- API version: 5.0.0
+- Package version: 1.0.0
+- Generator version: 7.3.0-SNAPSHOT
+- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
+
+## Installation
+
+Put the package under your project folder in a directory named `manticoresearch` and add the following to `Cargo.toml` under `[dependencies]`:
+
+```
+manticoresearch = { path = "./manticoresearch" }
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://127.0.0.1:9308*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*IndexApi* | [**bulk**](docs/IndexApi.md#bulk) | **Post** /bulk | Bulk table operations
+*IndexApi* | [**delete**](docs/IndexApi.md#delete) | **Post** /delete | Delete a document in a table
+*IndexApi* | [**insert**](docs/IndexApi.md#insert) | **Post** /insert | Create a new document in a table
+*IndexApi* | [**partial_replace**](docs/IndexApi.md#partial_replace) | **Post** /{table}/_update/{id} | Partially replaces a document in a table
+*IndexApi* | [**replace**](docs/IndexApi.md#replace) | **Post** /replace | Replace new document in a table
+*IndexApi* | [**update**](docs/IndexApi.md#update) | **Post** /update | Update a document in a table
+*SearchApi* | [**autocomplete**](docs/SearchApi.md#autocomplete) | **Post** /autocomplete | Performs an autocomplete search on a table
+*SearchApi* | [**percolate**](docs/SearchApi.md#percolate) | **Post** /pq/{table}/search | Perform reverse search on a percolate table
+*SearchApi* | [**search**](docs/SearchApi.md#search) | **Post** /search | Performs a search on a table
+*UtilsApi* | [**sql**](docs/UtilsApi.md#sql) | **Post** /sql | Perform SQL requests
+
+
+## Documentation For Models
+
+ - [AggComposite](docs/AggComposite.md)
+ - [AggCompositeSource](docs/AggCompositeSource.md)
+ - [AggCompositeTerm](docs/AggCompositeTerm.md)
+ - [AggTerms](docs/AggTerms.md)
+ - [Aggregation](docs/Aggregation.md)
+ - [AutocompleteRequest](docs/AutocompleteRequest.md)
+ - [BoolFilter](docs/BoolFilter.md)
+ - [BulkResponse](docs/BulkResponse.md)
+ - [DeleteDocumentRequest](docs/DeleteDocumentRequest.md)
+ - [DeleteResponse](docs/DeleteResponse.md)
+ - [ErrorResponse](docs/ErrorResponse.md)
+ - [FulltextFilter](docs/FulltextFilter.md)
+ - [GeoDistance](docs/GeoDistance.md)
+ - [GeoDistanceLocationAnchor](docs/GeoDistanceLocationAnchor.md)
+ - [Highlight](docs/Highlight.md)
+ - [HighlightFieldOption](docs/HighlightFieldOption.md)
+ - [HitsHits](docs/HitsHits.md)
+ - [InsertDocumentRequest](docs/InsertDocumentRequest.md)
+ - [Join](docs/Join.md)
+ - [JoinCond](docs/JoinCond.md)
+ - [JoinOn](docs/JoinOn.md)
+ - [KnnQuery](docs/KnnQuery.md)
+ - [Match](docs/Match.md)
+ - [MatchAll](docs/MatchAll.md)
+ - [PercolateRequest](docs/PercolateRequest.md)
+ - [PercolateRequestQuery](docs/PercolateRequestQuery.md)
+ - [QueryFilter](docs/QueryFilter.md)
+ - [Range](docs/Range.md)
+ - [ReplaceDocumentRequest](docs/ReplaceDocumentRequest.md)
+ - [ResponseError](docs/ResponseError.md)
+ - [ResponseErrorDetails](docs/ResponseErrorDetails.md)
+ - [SearchQuery](docs/SearchQuery.md)
+ - [SearchRequest](docs/SearchRequest.md)
+ - [SearchResponse](docs/SearchResponse.md)
+ - [SearchResponseHits](docs/SearchResponseHits.md)
+ - [SourceRules](docs/SourceRules.md)
+ - [SqlObjResponse](docs/SqlObjResponse.md)
+ - [SqlResponse](docs/SqlResponse.md)
+ - [SuccessResponse](docs/SuccessResponse.md)
+ - [UpdateDocumentRequest](docs/UpdateDocumentRequest.md)
+ - [UpdateResponse](docs/UpdateResponse.md)
+
+
+To get access to the crate's generated documentation, use:
+
+```
+cargo doc --open
+```
+
+## Compatibility table
+
+| **manticoresearch-rust* | **Manticore Search** | **Compatibility** |
+| ------------------------| ----------------------------------- | ------------------------|
+| `manticoresearch-dev` | `dev` (latest development version) | ✅ Fully Compatible |
+| 1.0.0 or newer | 7.0.0 or newer | ✅ Fully Compatible |
+
+
+## Getting started
+
+```rust
+
+use std::sync::Arc;
+use std::collections::HashMap;
+use serde_json;
+use http_body_util::BodyExt;
+use tokio;
+use manticoresearch::{
+ apis::{
+ {Error,configuration::Configuration,IndexApi,IndexApiClient,SearchApi,SearchApiClient,UtilsApi,UtilsApiClient}
+ },
+ models::{SearchRequest,SearchQuery,Highlight}
+};
+
+
+#[tokio::main]
+async fn main() {
+ let api_config = Arc::new(Configuration::new());
+ let utils_api = UtilsApiClient::new(api_config.clone());
+ let index_api = IndexApiClient::new(api_config.clone());
+ let search_api = SearchApiClient::new(api_config.clone());
+
+ // Drop table if it exists
+ let _ = utils_api.sql("DROP TABLE IF EXISTS movies", Some(true)).await;
+
+ // Create table
+ let _ = utils_api
+ .sql(
+ "CREATE TABLE IF NOT EXISTS movies (title text, plot text, _year integer, rating float, cat string, code multi, type_vector float_vector knn_type='hnsw' knn_dims='3' hnsw_similarity='l2')",
+ Some(true),
+ )
+ .await;
+
+ // Bulk insert documents
+ let bulk_body = r#"{"insert": {"table" : "movies", "id" : 1, "doc" : {"title" : "Star Trek 2: Nemesis", "plot": "The Enterprise is diverted to the Romulan homeworld Romulus, supposedly because they want to negotiate a peace treaty. Captain Picard and his crew discover a serious threat to the Federation once Praetor Shinzon plans to attack Earth.", "_year": 2002, "rating": 6.4, "cat": "R", "code": [1,2,3], "type_vector": [0.2, 1.4, -2.3]}}}
+{"insert": {"table" : "movies", "id" : 2, "doc" : {"title" : "Star Trek 1: Nemesis", "plot": "The Enterprise is diverted to the Romulan homeworld Romulus, supposedly because they want to negotiate a peace treaty. Captain Picard and his crew discover a serious threat to the Federation once Praetor Shinzon plans to attack Earth.", "_year": 2001, "rating": 6.5, "cat": "PG-13", "code": [1,12,3], "type_vector": [0.8, 0.4, 1.3]}}}
+{"insert": {"table" : "movies", "id" : 3, "doc" : {"title" : "Star Trek 3: Nemesis", "plot": "The Enterprise is diverted to the Romulan homeworld Romulus, supposedly because they want to negotiate a peace treaty. Captain Picard and his crew discover a serious threat to the Federation once Praetor Shinzon plans to attack Earth.", "_year": 2003, "rating": 6.6, "cat": "R", "code": [11,2,3], "type_vector": [1.5, -1.0, 1.6]}}}
+{"insert": {"table" : "movies", "id" : 4, "doc" : {"title" : "Star Trek 4: Nemesis", "plot": "The Enterprise is diverted to the Romulan homeworld Romulus, supposedly because they want to negotiate a peace treaty. Captain Picard and his crew discover a serious threat to the Federation once Praetor Shinzon plans to attack Earth.", "_year": 2003, "rating": 6.0, "cat": "R", "code": [1,2,4], "type_vector": [0.4, 2.4, 0.9]}}}
+"#;
+
+ let _ = index_api.bulk(bulk_body).await;
+
+ // Prepare search request
+ let query = SearchQuery {
+ query_string: Some(serde_json::json!("Star").into()),
+ ..Default::default()
+ };
+
+ let highlight = Highlight {
+ fields: Some(serde_json::json!(["title"]).into()),
+ ..Default::default()
+ };
+
+ let mut options = HashMap::new();
+ options.insert("cutoff".to_string(), serde_json::json!(5));
+ options.insert("ranker".to_string(), serde_json::json!("bm25"));
+
+ let search_request = SearchRequest {
+ table: "movies".to_string(),
+ query: Some(Box::new(query)),
+ highlight: Some(Box::new(highlight)),
+ options: Some(serde_json::json!(options)),
+ ..Default::default()
+ };
+
+ // Perform search
+ let res = search_api.search(search_request).await;
+
+ let _ = match res {
+ Ok(result) => {
+ println!("Search result: {:?}", result)
+ },
+ Err(error) => {
+ if let Error::Api(error_info) = error {
+ let body_bytes = error_info.body.collect().await.expect("ERROR RESPONSE").to_bytes();
+ println!("Error response: {:?}", String::from_utf8(body_bytes.to_vec()).unwrap())
+ }
+ }
+ };
+
+}
+
+
+```
diff --git a/docs/AggComposite.md b/docs/AggComposite.md
new file mode 100755
index 0000000..80e99ba
--- /dev/null
+++ b/docs/AggComposite.md
@@ -0,0 +1,12 @@
+# AggComposite
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**size** | Option<**i32**> | Maximum number of composite buckets in the result | [optional]
+**sources** | Option<[**Vec<::std::collections::HashMap>**](map.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AggCompositeSource.md b/docs/AggCompositeSource.md
new file mode 100755
index 0000000..167d70b
--- /dev/null
+++ b/docs/AggCompositeSource.md
@@ -0,0 +1,11 @@
+# AggCompositeSource
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**terms** | [**crate::models::AggCompositeTerm**](aggCompositeTerm.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AggCompositeTerm.md b/docs/AggCompositeTerm.md
new file mode 100755
index 0000000..61f5861
--- /dev/null
+++ b/docs/AggCompositeTerm.md
@@ -0,0 +1,11 @@
+# AggCompositeTerm
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**field** | **String** | Name of field to operate with |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AggTerms.md b/docs/AggTerms.md
new file mode 100755
index 0000000..600b706
--- /dev/null
+++ b/docs/AggTerms.md
@@ -0,0 +1,12 @@
+# AggTerms
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**field** | **String** | Name of attribute to aggregate by |
+**size** | Option<**i32**> | Maximum number of buckets in the result | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Aggregation.md b/docs/Aggregation.md
new file mode 100755
index 0000000..3c63441
--- /dev/null
+++ b/docs/Aggregation.md
@@ -0,0 +1,13 @@
+# Aggregation
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**terms** | Option<[**crate::models::AggTerms**](aggTerms.md)> | | [optional]
+**sort** | Option<[**Vec**](serde_json::Value.md)> | | [optional]
+**composite** | Option<[**crate::models::AggComposite**](aggComposite.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/AutocompleteRequest.md b/docs/AutocompleteRequest.md
new file mode 100755
index 0000000..6e53f10
--- /dev/null
+++ b/docs/AutocompleteRequest.md
@@ -0,0 +1,13 @@
+# AutocompleteRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | **String** | The table to perform the search on |
+**query** | **String** | The beginning of the string to autocomplete |
+**options** | Option<[**serde_json::Value**](.md)> | Autocomplete options - layouts: A comma-separated string of keyboard layout codes to validate and check for spell correction. Available options - us, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be. By default, all are enabled. - fuzziness: (0,1 or 2) Maximum Levenshtein distance for finding typos. Set to 0 to disable fuzzy matching. Default is 2 - prepend: true/false If true, adds an asterisk before the last word for prefix expansion (e.g., *word ) - append: true/false If true, adds an asterisk after the last word for prefix expansion (e.g., word* ) - expansion_len: Number of characters to expand in the last word. Default is 10. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BoolFilter.md b/docs/BoolFilter.md
new file mode 100755
index 0000000..766d810
--- /dev/null
+++ b/docs/BoolFilter.md
@@ -0,0 +1,13 @@
+# BoolFilter
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**must** | Option<[**Vec**](queryFilter.md)> | Query clauses that must match for the document to be included | [optional]
+**must_not** | Option<[**Vec**](queryFilter.md)> | Query clauses that must not match for the document to be included | [optional]
+**should** | Option<[**Vec**](queryFilter.md)> | Query clauses that should be matched, but are not required | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/BulkResponse.md b/docs/BulkResponse.md
new file mode 100755
index 0000000..319ac7f
--- /dev/null
+++ b/docs/BulkResponse.md
@@ -0,0 +1,15 @@
+# BulkResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**items** | Option<[**Vec**](serde_json::Value.md)> | List of results | [optional]
+**errors** | Option<**bool**> | Errors occurred during the bulk operation | [optional]
+**error** | Option<**String**> | Error message describing an error if such occurred | [optional]
+**current_line** | Option<**i32**> | Number of the row returned in the response | [optional]
+**skipped_lines** | Option<**i32**> | Number of rows skipped in the response | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/DeleteDocumentRequest.md b/docs/DeleteDocumentRequest.md
new file mode 100755
index 0000000..6ddcf52
--- /dev/null
+++ b/docs/DeleteDocumentRequest.md
@@ -0,0 +1,14 @@
+# DeleteDocumentRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | **String** | Table name |
+**cluster** | Option<**String**> | Cluster name | [optional]
+**id** | Option<**i64**> | The ID of document for deletion | [optional]
+**query** | Option<[**serde_json::Value**](.md)> | Defines the criteria to match documents for deletion | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/DeleteResponse.md b/docs/DeleteResponse.md
new file mode 100755
index 0000000..d8c3512
--- /dev/null
+++ b/docs/DeleteResponse.md
@@ -0,0 +1,15 @@
+# DeleteResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | Option<**String**> | The name of the table from which the document was deleted | [optional]
+**deleted** | Option<**i32**> | Number of documents deleted | [optional]
+**id** | Option<**i64**> | The ID of the deleted document. If multiple documents are deleted, the ID of the first deleted document is returned | [optional]
+**found** | Option<**bool**> | Indicates whether any documents to be deleted were found | [optional]
+**result** | Option<**String**> | Result of the delete operation, typically 'deleted' | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md
new file mode 100755
index 0000000..96e4b64
--- /dev/null
+++ b/docs/ErrorResponse.md
@@ -0,0 +1,12 @@
+# ErrorResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**error** | [**crate::models::ResponseError**](responseError.md) | |
+**status** | Option<**i32**> | HTTP status code of the error response | [optional][default to 500]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/FulltextFilter.md b/docs/FulltextFilter.md
new file mode 100755
index 0000000..98cee45
--- /dev/null
+++ b/docs/FulltextFilter.md
@@ -0,0 +1,14 @@
+# FulltextFilter
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query_string** | Option<**String**> | Filter object defining a query string | [optional]
+**r#match** | Option<[**serde_json::Value**](.md)> | Filter object defining a match keyword passed as a string or in a Match object | [optional]
+**match_phrase** | Option<[**serde_json::Value**](.md)> | Filter object defining a match phrase | [optional]
+**match_all** | Option<[**serde_json::Value**](.md)> | Filter object to select all documents | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/GeoDistance.md b/docs/GeoDistance.md
new file mode 100755
index 0000000..c25a37a
--- /dev/null
+++ b/docs/GeoDistance.md
@@ -0,0 +1,14 @@
+# GeoDistance
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**location_anchor** | Option<[**crate::models::GeoDistanceLocationAnchor**](geoDistance_location_anchor.md)> | | [optional]
+**location_source** | Option<[**serde_json::Value**](.md)> | Field name in the document that contains location data | [optional]
+**distance_type** | Option<[**serde_json::Value**](serde_json::Value.md)> | Algorithm used to calculate the distance | [optional]
+**distance** | Option<[**serde_json::Value**](.md)> | The distance from the anchor point to filter results by | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/GeoDistanceLocationAnchor.md b/docs/GeoDistanceLocationAnchor.md
new file mode 100755
index 0000000..1aa8dcc
--- /dev/null
+++ b/docs/GeoDistanceLocationAnchor.md
@@ -0,0 +1,12 @@
+# GeoDistanceLocationAnchor
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**lat** | Option<[**serde_json::Value**](.md)> | Latitude of the anchor point | [optional]
+**lon** | Option<[**serde_json::Value**](.md)> | Longitude of the anchor point | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Highlight.md b/docs/Highlight.md
new file mode 100755
index 0000000..8b1d5d5
--- /dev/null
+++ b/docs/Highlight.md
@@ -0,0 +1,33 @@
+# Highlight
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**fragment_size** | Option<[**serde_json::Value**](.md)> | Maximum size of the text fragments in highlighted snippets per field | [optional]
+**limit** | Option<[**serde_json::Value**](.md)> | Maximum size of snippets per field | [optional]
+**limit_snippets** | Option<[**serde_json::Value**](.md)> | Maximum number of snippets per field | [optional]
+**limit_words** | Option<[**serde_json::Value**](.md)> | Maximum number of words per field | [optional]
+**number_of_fragments** | Option<[**serde_json::Value**](.md)> | Total number of highlighted fragments per field | [optional]
+**after_match** | Option<**String**> | Text inserted after the matched term, typically used for HTML formatting | [optional][default to ]
+**allow_empty** | Option<**bool**> | Permits an empty string to be returned as the highlighting result. Otherwise, the beginning of the original text would be returned | [optional]
+**around** | Option<**i32**> | Number of words around the match to include in the highlight | [optional]
+**before_match** | Option<**String**> | Text inserted before the match, typically used for HTML formatting | [optional][default to ]
+**emit_zones** | Option<**bool**> | Emits an HTML tag with the enclosing zone name before each highlighted snippet | [optional]
+**encoder** | Option<**String**> | If set to 'html', retains HTML markup when highlighting | [optional]
+**fields** | Option<[**serde_json::Value**](.md)> | | [optional]
+**force_all_words** | Option<**bool**> | Ignores the length limit until the result includes all keywords | [optional]
+**force_snippets** | Option<**bool**> | Forces snippet generation even if limits allow highlighting the entire text | [optional]
+**highlight_query** | Option<[**crate::models::QueryFilter**](queryFilter.md)> | | [optional]
+**html_strip_mode** | Option<**String**> | Defines the mode for handling HTML markup in the highlight | [optional]
+**limits_per_field** | Option<**bool**> | Determines whether the 'limit', 'limit_words', and 'limit_snippets' options operate as individual limits in each field of the document | [optional]
+**no_match_size** | Option<**i32**> | If set to 1, allows an empty string to be returned as a highlighting result | [optional]
+**order** | Option<**String**> | Sets the sorting order of highlighted snippets | [optional]
+**pre_tags** | Option<**String**> | Text inserted before each highlighted snippet | [optional][default to ]
+**post_tags** | Option<**String**> | Text inserted after each highlighted snippet | [optional][default to ]
+**start_snippet_id** | Option<**i32**> | Sets the starting value of the %SNIPPET_ID% macro | [optional]
+**use_boundaries** | Option<**bool**> | Defines whether to additionally break snippets by phrase boundary characters | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/HighlightFieldOption.md b/docs/HighlightFieldOption.md
new file mode 100755
index 0000000..b2e37ef
--- /dev/null
+++ b/docs/HighlightFieldOption.md
@@ -0,0 +1,15 @@
+# HighlightFieldOption
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**fragment_size** | Option<**i32**> | Maximum size of the text fragments in highlighted snippets per field | [optional]
+**limit** | Option<**i32**> | Maximum size of snippets per field | [optional]
+**limit_snippets** | Option<**i32**> | Maximum number of snippets per field | [optional]
+**limit_words** | Option<**i32**> | Maximum number of words per field | [optional]
+**number_of_fragments** | Option<**i32**> | Total number of highlighted fragments per field | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/HitsHits.md b/docs/HitsHits.md
new file mode 100755
index 0000000..d933472
--- /dev/null
+++ b/docs/HitsHits.md
@@ -0,0 +1,18 @@
+# HitsHits
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_id** | Option<**i64**> | The ID of the matched document | [optional]
+**_score** | Option<**i32**> | The score of the matched document | [optional]
+**_source** | Option<[**serde_json::Value**](.md)> | The source data of the matched document | [optional]
+**_knn_dist** | Option<**f32**> | The knn distance of the matched document returned for knn queries | [optional]
+**highlight** | Option<[**serde_json::Value**](.md)> | The highlighting-related data of the matched document | [optional]
+**table** | Option<**String**> | The table name of the matched document returned for percolate queries | [optional]
+**_type_colon** | Option<**String**> | The type of the matched document returned for percolate queries | [optional]
+**fields** | Option<[**serde_json::Value**](.md)> | The percolate-related fields of the matched document returned for percolate queries | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/IndexApi.md b/docs/IndexApi.md
new file mode 100755
index 0000000..91e51e7
--- /dev/null
+++ b/docs/IndexApi.md
@@ -0,0 +1,196 @@
+# \IndexApi
+
+All URIs are relative to *http://127.0.0.1:9308*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**bulk**](IndexApi.md#bulk) | **Post** /bulk | Bulk table operations
+[**delete**](IndexApi.md#delete) | **Post** /delete | Delete a document in a table
+[**insert**](IndexApi.md#insert) | **Post** /insert | Create a new document in a table
+[**partial_replace**](IndexApi.md#partial_replace) | **Post** /{table}/_update/{id} | Partially replaces a document in a table
+[**replace**](IndexApi.md#replace) | **Post** /replace | Replace new document in a table
+[**update**](IndexApi.md#update) | **Post** /update | Update a document in a table
+
+
+
+## bulk
+
+> crate::models::BulkResponse bulk(body)
+Bulk table operations
+
+Sends multiple operatons like inserts, updates, replaces or deletes. For each operation it's object must have same format as in their dedicated method. The method expects a raw string as the batch in NDJSON. Each operation object needs to be serialized to JSON and separated by endline (\\n). An example of raw input: ``` {\"insert\": {\"table\": \"movies\", \"doc\": {\"plot\": \"A secret team goes to North Pole\", \"rating\": 9.5, \"language\": [2, 3], \"title\": \"This is an older movie\", \"lon\": 51.99, \"meta\": {\"keywords\":[\"travel\",\"ice\"],\"genre\":[\"adventure\"]}, \"year\": 1950, \"lat\": 60.4, \"advise\": \"PG-13\"}}} \\n {\"delete\": {\"table\": \"movies\",\"id\":700}} ``` Responds with an object telling whenever any errors occured and an array with status for each operation: ``` { 'items': [ { 'update':{'table':'products','id':1,'result':'updated'} }, { 'update':{'table':'products','id':2,'result':'updated'} } ], 'errors':false } ```
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**body** | **String** | | [required] |
+
+### Return type
+
+[**crate::models::BulkResponse**](bulkResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/x-ndjson
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## delete
+
+> crate::models::DeleteResponse delete(delete_document_request)
+Delete a document in a table
+
+Delete one or several documents. The method has 2 ways of deleting: either by id, in case only one document is deleted or by using a match query, in which case multiple documents can be delete . Example of input to delete by id: ``` {'table':'movies','id':100} ``` Example of input to delete using a query: ``` { 'table':'movies', 'query': { 'bool': { 'must': [ {'query_string':'new movie'} ] } } } ``` The match query has same syntax as in for searching. Responds with an object telling how many documents got deleted: ``` {'table':'products','updated':1} ```
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**delete_document_request** | [**DeleteDocumentRequest**](DeleteDocumentRequest.md) | | [required] |
+
+### Return type
+
+[**crate::models::DeleteResponse**](deleteResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## insert
+
+> crate::models::SuccessResponse insert(insert_document_request)
+Create a new document in a table
+
+Insert a document. Expects an object like: ``` { 'table':'movies', 'id':701, 'doc': { 'title':'This is an old movie', 'plot':'A secret team goes to North Pole', 'year':1950, 'rating':9.5, 'lat':60.4, 'lon':51.99, 'advise':'PG-13', 'meta':'{\"keywords\":{\"travel\",\"ice\"},\"genre\":{\"adventure\"}}', 'language':[2,3] } } ``` The document id can also be missing, in which case an autogenerated one will be used: ``` { 'table':'movies', 'doc': { 'title':'This is a new movie', 'plot':'A secret team goes to North Pole', 'year':2020, 'rating':9.5, 'lat':60.4, 'lon':51.99, 'advise':'PG-13', 'meta':'{\"keywords\":{\"travel\",\"ice\"},\"genre\":{\"adventure\"}}', 'language':[2,3] } } ``` It responds with an object in format: ``` {'table':'products','id':701,'created':true,'result':'created','status':201} ```
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**insert_document_request** | [**InsertDocumentRequest**](InsertDocumentRequest.md) | | [required] |
+
+### Return type
+
+[**crate::models::SuccessResponse**](successResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## partial_replace
+
+> crate::models::UpdateResponse partial_replace(table, id, replace_document_request)
+Partially replaces a document in a table
+
+Partially replaces a document with given id in a table Responds with an object of the following format: ``` {'table':'products','updated':1} ```
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**table** | **String** | Name of the percolate table | [required] |
+**id** | **i64** | Id of the document to replace | [required] |
+**replace_document_request** | [**ReplaceDocumentRequest**](ReplaceDocumentRequest.md) | | [required] |
+
+### Return type
+
+[**crate::models::UpdateResponse**](updateResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## replace
+
+> crate::models::SuccessResponse replace(insert_document_request)
+Replace new document in a table
+
+Replace an existing document. Input has same format as `insert` operation. Responds with an object in format: ``` {'table':'products','id':1,'created':false,'result':'updated','status':200} ```
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**insert_document_request** | [**InsertDocumentRequest**](InsertDocumentRequest.md) | | [required] |
+
+### Return type
+
+[**crate::models::SuccessResponse**](successResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## update
+
+> crate::models::UpdateResponse update(update_document_request)
+Update a document in a table
+
+Update one or several documents. The update can be made by passing the id or by using a match query in case multiple documents can be updated. For example update a document using document id: ``` {'table':'movies','doc':{'rating':9.49},'id':100} ``` And update by using a match query: ``` { 'table':'movies', 'doc':{'rating':9.49}, 'query': { 'bool': { 'must': [ {'query_string':'new movie'} ] } } } ``` The match query has same syntax as for searching. Responds with an object that tells how many documents where updated in format: ``` {'table':'products','updated':1} ```
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**update_document_request** | [**UpdateDocumentRequest**](UpdateDocumentRequest.md) | | [required] |
+
+### Return type
+
+[**crate::models::UpdateResponse**](updateResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/InsertDocumentRequest.md b/docs/InsertDocumentRequest.md
new file mode 100755
index 0000000..df39864
--- /dev/null
+++ b/docs/InsertDocumentRequest.md
@@ -0,0 +1,14 @@
+# InsertDocumentRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | **String** | Name of the table to insert the document into |
+**cluster** | Option<**String**> | Name of the cluster to insert the document into | [optional]
+**id** | Option<**i64**> | Document ID. If not provided, an ID will be auto-generated | [optional]
+**doc** | [**serde_json::Value**](.md) | Object containing document data |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Join.md b/docs/Join.md
new file mode 100755
index 0000000..bf0a580
--- /dev/null
+++ b/docs/Join.md
@@ -0,0 +1,14 @@
+# Join
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**r#type** | **String** | Type of the join operation |
+**on** | [**Vec**](joinOn.md) | List of objects defining joined tables |
+**query** | Option<[**crate::models::FulltextFilter**](fulltextFilter.md)> | | [optional]
+**table** | **String** | Basic table of the join operation |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/JoinCond.md b/docs/JoinCond.md
new file mode 100755
index 0000000..57d626d
--- /dev/null
+++ b/docs/JoinCond.md
@@ -0,0 +1,13 @@
+# JoinCond
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**field** | **String** | Field to join on |
+**table** | **String** | Joined table |
+**r#type** | Option<[**serde_json::Value**](.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/JoinOn.md b/docs/JoinOn.md
new file mode 100755
index 0000000..8b67264
--- /dev/null
+++ b/docs/JoinOn.md
@@ -0,0 +1,13 @@
+# JoinOn
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**right** | Option<[**crate::models::JoinCond**](joinCond.md)> | | [optional]
+**left** | Option<[**crate::models::JoinCond**](joinCond.md)> | | [optional]
+**operator** | Option<**String**> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/KnnQuery.md b/docs/KnnQuery.md
new file mode 100755
index 0000000..39d887b
--- /dev/null
+++ b/docs/KnnQuery.md
@@ -0,0 +1,16 @@
+# KnnQuery
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**field** | **String** | Field to perform the k-nearest neighbor search on |
+**k** | **i32** | The number of nearest neighbors to return |
+**query_vector** | Option<**Vec**> | The vector used as input for the KNN search | [optional]
+**doc_id** | Option<**i64**> | The docuemnt ID used as input for the KNN search | [optional]
+**ef** | Option<**i32**> | Optional parameter controlling the accuracy of the search | [optional]
+**filter** | Option<[**crate::models::QueryFilter**](queryFilter.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Match.md b/docs/Match.md
new file mode 100755
index 0000000..b9f8bc3
--- /dev/null
+++ b/docs/Match.md
@@ -0,0 +1,13 @@
+# Match
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query** | **String** | |
+**operator** | Option<**String**> | | [optional]
+**boost** | Option<**f32**> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/MatchAll.md b/docs/MatchAll.md
new file mode 100755
index 0000000..877ea9e
--- /dev/null
+++ b/docs/MatchAll.md
@@ -0,0 +1,11 @@
+# MatchAll
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_all** | **String** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PercolateRequest.md b/docs/PercolateRequest.md
new file mode 100755
index 0000000..4076d2c
--- /dev/null
+++ b/docs/PercolateRequest.md
@@ -0,0 +1,11 @@
+# PercolateRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query** | [**crate::models::PercolateRequestQuery**](percolateRequest_query.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/PercolateRequestQuery.md b/docs/PercolateRequestQuery.md
new file mode 100755
index 0000000..e63d4bb
--- /dev/null
+++ b/docs/PercolateRequestQuery.md
@@ -0,0 +1,11 @@
+# PercolateRequestQuery
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**percolate** | [**serde_json::Value**](.md) | Object representing the document to percolate |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/QueryFilter.md b/docs/QueryFilter.md
new file mode 100755
index 0000000..9248d72
--- /dev/null
+++ b/docs/QueryFilter.md
@@ -0,0 +1,19 @@
+# QueryFilter
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query_string** | Option<[**serde_json::Value**](.md)> | Filter object defining a query string | [optional]
+**r#match** | Option<[**serde_json::Value**](.md)> | Filter object defining a match keyword passed as a string or in a Match object | [optional]
+**match_phrase** | Option<[**serde_json::Value**](.md)> | Filter object defining a match phrase | [optional]
+**match_all** | Option<[**serde_json::Value**](.md)> | Filter object to select all documents | [optional]
+**bool** | Option<[**crate::models::BoolFilter**](boolFilter.md)> | | [optional]
+**equals** | Option<[**serde_json::Value**](.md)> | | [optional]
+**r#in** | Option<[**serde_json::Value**](.md)> | Filter to match a given set of attribute values. | [optional]
+**range** | Option<[**serde_json::Value**](.md)> | Filter to match a given range of attribute values passed in Range objects | [optional]
+**geo_distance** | Option<[**crate::models::GeoDistance**](geoDistance.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/Range.md b/docs/Range.md
new file mode 100755
index 0000000..ae70c4c
--- /dev/null
+++ b/docs/Range.md
@@ -0,0 +1,14 @@
+# Range
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**lt** | Option<[**serde_json::Value**](.md)> | | [optional]
+**lte** | Option<[**serde_json::Value**](.md)> | | [optional]
+**gt** | Option<[**serde_json::Value**](.md)> | | [optional]
+**gte** | Option<[**serde_json::Value**](.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ReplaceDocumentRequest.md b/docs/ReplaceDocumentRequest.md
new file mode 100755
index 0000000..3fe0a66
--- /dev/null
+++ b/docs/ReplaceDocumentRequest.md
@@ -0,0 +1,11 @@
+# ReplaceDocumentRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**doc** | [**serde_json::Value**](.md) | Object containing the new document data to replace the existing one. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ResponseError.md b/docs/ResponseError.md
new file mode 100755
index 0000000..785660a
--- /dev/null
+++ b/docs/ResponseError.md
@@ -0,0 +1,12 @@
+# ResponseError
+
+## Enum Variants
+
+| Name | Description |
+|---- | -----|
+| ResponseErrorDetails | |
+| String | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/ResponseErrorDetails.md b/docs/ResponseErrorDetails.md
new file mode 100755
index 0000000..25c290a
--- /dev/null
+++ b/docs/ResponseErrorDetails.md
@@ -0,0 +1,13 @@
+# ResponseErrorDetails
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**r#type** | **String** | Type or category of the error |
+**reason** | Option<**String**> | Detailed explanation of why the error occurred | [optional]
+**table** | Option<**String**> | The table related to the error, if applicable | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SearchApi.md b/docs/SearchApi.md
new file mode 100755
index 0000000..50ca0d5
--- /dev/null
+++ b/docs/SearchApi.md
@@ -0,0 +1,102 @@
+# \SearchApi
+
+All URIs are relative to *http://127.0.0.1:9308*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**autocomplete**](SearchApi.md#autocomplete) | **Post** /autocomplete | Performs an autocomplete search on a table
+[**percolate**](SearchApi.md#percolate) | **Post** /pq/{table}/search | Perform reverse search on a percolate table
+[**search**](SearchApi.md#search) | **Post** /search | Performs a search on a table
+
+
+
+## autocomplete
+
+> Vec autocomplete(autocomplete_request)
+Performs an autocomplete search on a table
+
+ The method expects an object with the following mandatory properties: * the name of the table to search * the query string to autocomplete For details, see the documentation on [**Autocomplete**](Autocomplete.md) An example: ``` { \"table\":\"table_name\", \"query\":\"query_beginning\" } ``` An example of the method's response: ``` [ { \"total\": 3, \"error\": \"\", \"warning\": \"\", \"columns\": [ { \"query\": { \"type\": \"string\" } } ], \"data\": [ { \"query\": \"hello\" }, { \"query\": \"helio\" }, { \"query\": \"hell\" } ] } ] ``` For more detailed information about the autocomplete queries, please refer to the documentation [here](https://manual.manticoresearch.com/Searching/Autocomplete).
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**autocomplete_request** | [**AutocompleteRequest**](AutocompleteRequest.md) | | [required] |
+
+### Return type
+
+[**Vec**](serde_json::Value.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## percolate
+
+> crate::models::SearchResponse percolate(table, percolate_request)
+Perform reverse search on a percolate table
+
+Performs a percolate search. This method must be used only on percolate tables. Expects two parameters: the table name and an object with array of documents to be tested. An example of the documents object: ``` { \"query\" { \"percolate\": { \"document\": { \"content\":\"sample content\" } } } } ``` Responds with an object with matched stored queries: ``` { 'timed_out':false, 'hits': { 'total':2, 'max_score':1, 'hits': [ { 'table':'idx_pq_1', '_type':'doc', '_id':'2', '_score':'1', '_source': { 'query': { 'match':{'title':'some'} } } }, { 'table':'idx_pq_1', '_type':'doc', '_id':'5', '_score':'1', '_source': { 'query': { 'ql':'some | none' } } } ] } } ```
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**table** | **String** | Name of the percolate table | [required] |
+**percolate_request** | [**PercolateRequest**](PercolateRequest.md) | | [required] |
+
+### Return type
+
+[**crate::models::SearchResponse**](searchResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## search
+
+> crate::models::SearchResponse search(search_request)
+Performs a search on a table
+
+ The method expects an object with the following mandatory properties: * the name of the table to search * the match query object For details, see the documentation on [**SearchRequest**](SearchRequest.md) The method returns an object with the following properties: - took: the time taken to execute the search query. - timed_out: a boolean indicating whether the query timed out. - hits: an object with the following properties: - total: the total number of hits found. - hits: an array of hit objects, where each hit object represents a matched document. Each hit object has the following properties: - _id: the ID of the matched document. - _score: the score of the matched document. - _source: the source data of the matched document. In addition, if profiling is enabled, the response will include an additional array with profiling information attached. Also, if pagination is enabled, the response will include an additional 'scroll' property with a scroll token to use for pagination Here is an example search response: ``` { 'took':10, 'timed_out':false, 'hits': { 'total':2, 'hits': [ {'_id':'1','_score':1,'_source':{'gid':11}}, {'_id':'2','_score':1,'_source':{'gid':12}} ] } } ``` For more information about the match query syntax and additional parameters that can be added to request and response, please see the documentation [here](https://manual.manticoresearch.com/Searching/Full_text_matching/Basic_usage#HTTP-JSON).
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**search_request** | [**SearchRequest**](SearchRequest.md) | | [required] |
+
+### Return type
+
+[**crate::models::SearchResponse**](searchResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/SearchQuery.md b/docs/SearchQuery.md
new file mode 100755
index 0000000..8d9324d
--- /dev/null
+++ b/docs/SearchQuery.md
@@ -0,0 +1,20 @@
+# SearchQuery
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**query_string** | Option<[**serde_json::Value**](.md)> | Filter object defining a query string | [optional]
+**r#match** | Option<[**serde_json::Value**](.md)> | Filter object defining a match keyword passed as a string or in a Match object | [optional]
+**match_phrase** | Option<[**serde_json::Value**](.md)> | Filter object defining a match phrase | [optional]
+**match_all** | Option<[**serde_json::Value**](.md)> | Filter object to select all documents | [optional]
+**bool** | Option<[**crate::models::BoolFilter**](boolFilter.md)> | | [optional]
+**equals** | Option<[**serde_json::Value**](.md)> | | [optional]
+**r#in** | Option<[**serde_json::Value**](.md)> | Filter to match a given set of attribute values. | [optional]
+**range** | Option<[**serde_json::Value**](.md)> | Filter to match a given range of attribute values passed in Range objects | [optional]
+**geo_distance** | Option<[**crate::models::GeoDistance**](geoDistance.md)> | | [optional]
+**highlight** | Option<[**crate::models::Highlight**](highlight.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SearchRequest.md b/docs/SearchRequest.md
new file mode 100755
index 0000000..f72a975
--- /dev/null
+++ b/docs/SearchRequest.md
@@ -0,0 +1,25 @@
+# SearchRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | **String** | The table to perform the search on |
+**query** | Option<[**crate::models::SearchQuery**](searchQuery.md)> | | [optional]
+**join** | Option<[**Vec**](join.md)> | Join clause to combine search data from multiple tables | [optional]
+**highlight** | Option<[**crate::models::Highlight**](highlight.md)> | | [optional]
+**limit** | Option<**i32**> | Maximum number of results to return | [optional]
+**knn** | Option<[**crate::models::KnnQuery**](knnQuery.md)> | | [optional]
+**aggs** | Option<[**::std::collections::HashMap**](aggregation.md)> | Defines aggregation settings for grouping results | [optional]
+**expressions** | Option<**::std::collections::HashMap**> | Expressions to calculate additional values for the result | [optional]
+**max_matches** | Option<**i32**> | Maximum number of matches allowed in the result | [optional]
+**offset** | Option<**i32**> | Starting point for pagination of the result | [optional]
+**options** | Option<[**serde_json::Value**](.md)> | Additional search options | [optional]
+**profile** | Option<**bool**> | Enable or disable profiling of the search request | [optional]
+**sort** | Option<[**serde_json::Value**](.md)> | | [optional]
+**_source** | Option<[**serde_json::Value**](.md)> | | [optional]
+**track_scores** | Option<**bool**> | Enable or disable result weight calculation used for sorting | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SearchResponse.md b/docs/SearchResponse.md
new file mode 100755
index 0000000..ebbe0f1
--- /dev/null
+++ b/docs/SearchResponse.md
@@ -0,0 +1,17 @@
+# SearchResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**took** | Option<**i32**> | Time taken to execute the search | [optional]
+**timed_out** | Option<**bool**> | Indicates whether the search operation timed out | [optional]
+**aggregations** | Option<[**serde_json::Value**](.md)> | Aggregated search results grouped by the specified criteria | [optional]
+**hits** | Option<[**crate::models::SearchResponseHits**](searchResponse_hits.md)> | | [optional]
+**profile** | Option<[**serde_json::Value**](.md)> | Profile information about the search execution, if profiling is enabled | [optional]
+**scroll** | Option<**String**> | Scroll token to be used fo pagination | [optional]
+**warning** | Option<[**serde_json::Value**](.md)> | Warnings encountered during the search operation | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SearchResponseHits.md b/docs/SearchResponseHits.md
new file mode 100755
index 0000000..59b2bea
--- /dev/null
+++ b/docs/SearchResponseHits.md
@@ -0,0 +1,14 @@
+# SearchResponseHits
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**max_score** | Option<**i32**> | Maximum score among the matched documents | [optional]
+**total** | Option<**i32**> | Total number of matched documents | [optional]
+**total_relation** | Option<**String**> | Indicates whether the total number of hits is accurate or an estimate | [optional]
+**hits** | Option<[**Vec**](hitsHits.md)> | Array of hit objects, each representing a matched document | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SourceRules.md b/docs/SourceRules.md
new file mode 100755
index 0000000..3db4a13
--- /dev/null
+++ b/docs/SourceRules.md
@@ -0,0 +1,12 @@
+# SourceRules
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**includes** | Option<[**serde_json::Value**](.md)> | List of fields to include in the response | [optional][default to []]
+**excludes** | Option<[**serde_json::Value**](.md)> | List of fields to exclude from the response | [optional][default to [""]]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SqlObjResponse.md b/docs/SqlObjResponse.md
new file mode 100755
index 0000000..e6c40df
--- /dev/null
+++ b/docs/SqlObjResponse.md
@@ -0,0 +1,11 @@
+# SqlObjResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**hits** | [**serde_json::Value**](.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SqlResponse.md b/docs/SqlResponse.md
new file mode 100755
index 0000000..869fa39
--- /dev/null
+++ b/docs/SqlResponse.md
@@ -0,0 +1,12 @@
+# SqlResponse
+
+## Enum Variants
+
+| Name | Description |
+|---- | -----|
+| SqlObjResponse | List of responses from executed SQL queries |
+| Vec | List of responses from executed SQL queries |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/SuccessResponse.md b/docs/SuccessResponse.md
new file mode 100755
index 0000000..d7988a5
--- /dev/null
+++ b/docs/SuccessResponse.md
@@ -0,0 +1,16 @@
+# SuccessResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | Option<**String**> | Name of the document table | [optional]
+**id** | Option<**i64**> | ID of the document affected by the request operation | [optional]
+**created** | Option<**bool**> | Indicates whether the document was created as a result of the operation | [optional]
+**result** | Option<**String**> | Result of the operation, typically 'created', 'updated', or 'deleted' | [optional]
+**found** | Option<**bool**> | Indicates whether the document was found in the table | [optional]
+**status** | Option<**i32**> | HTTP status code representing the result of the operation | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UpdateDocumentRequest.md b/docs/UpdateDocumentRequest.md
new file mode 100755
index 0000000..87811b3
--- /dev/null
+++ b/docs/UpdateDocumentRequest.md
@@ -0,0 +1,15 @@
+# UpdateDocumentRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | **String** | Name of the document table |
+**cluster** | Option<**String**> | Name of the document cluster | [optional]
+**doc** | [**serde_json::Value**](.md) | Object containing the document fields to update |
+**id** | Option<**i64**> | Document ID | [optional]
+**query** | Option<[**crate::models::QueryFilter**](queryFilter.md)> | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UpdateResponse.md b/docs/UpdateResponse.md
new file mode 100755
index 0000000..1250c47
--- /dev/null
+++ b/docs/UpdateResponse.md
@@ -0,0 +1,14 @@
+# UpdateResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**table** | Option<**String**> | Name of the document table | [optional]
+**updated** | Option<**i32**> | Number of documents updated | [optional]
+**id** | Option<**i64**> | Document ID | [optional]
+**result** | Option<**String**> | Result of the update operation, typically 'updated' | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/docs/UtilsApi.md b/docs/UtilsApi.md
new file mode 100755
index 0000000..5a5a7e5
--- /dev/null
+++ b/docs/UtilsApi.md
@@ -0,0 +1,40 @@
+# \UtilsApi
+
+All URIs are relative to *http://127.0.0.1:9308*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**sql**](UtilsApi.md#sql) | **Post** /sql | Perform SQL requests
+
+
+
+## sql
+
+> crate::models::SqlResponse sql(body, raw_response)
+Perform SQL requests
+
+Run a query in SQL format. Expects a query string passed through `body` parameter and optional `raw_response` parameter that defines a format of response. `raw_response` can be set to `False` for Select queries only, e.g., `SELECT * FROM mytable` The query string must stay as it is, no URL encoding is needed. The response object depends on the query executed. In select mode the response has same format as `/search` operation.
+
+### Parameters
+
+
+Name | Type | Description | Required | Notes
+------------- | ------------- | ------------- | ------------- | -------------
+**body** | **String** | A query parameter string. | [required] |
+**raw_response** | Option<**bool**> | Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is 'True'. | |[default to true]
+
+### Return type
+
+[**crate::models::SqlResponse**](sqlResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: text/plain
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/git_push.sh b/git_push.sh
new file mode 100755
index 0000000..22ef4ea
--- /dev/null
+++ b/git_push.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="manticoresoftware"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="manticoresearch-rust"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=$(git remote)
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
diff --git a/src/apis/client.rs b/src/apis/client.rs
new file mode 100755
index 0000000..831918b
--- /dev/null
+++ b/src/apis/client.rs
@@ -0,0 +1,37 @@
+use std::sync::Arc;
+
+use hyper;
+use hyper_util::client::legacy::connect::Connect;
+use super::configuration::Configuration;
+
+pub struct APIClient {
+ index_api: Box,
+ search_api: Box,
+ utils_api: Box,
+}
+
+impl APIClient {
+ pub fn new(configuration: Configuration) -> APIClient
+ where C: Clone + std::marker::Send + Sync + 'static {
+ let rc = Arc::new(configuration);
+
+ APIClient {
+ index_api: Box::new(crate::apis::IndexApiClient::new(rc.clone())),
+ search_api: Box::new(crate::apis::SearchApiClient::new(rc.clone())),
+ utils_api: Box::new(crate::apis::UtilsApiClient::new(rc.clone())),
+ }
+ }
+
+ pub fn index_api(&self) -> &dyn crate::apis::IndexApi{
+ self.index_api.as_ref()
+ }
+
+ pub fn search_api(&self) -> &dyn crate::apis::SearchApi{
+ self.search_api.as_ref()
+ }
+
+ pub fn utils_api(&self) -> &dyn crate::apis::UtilsApi{
+ self.utils_api.as_ref()
+ }
+
+}
diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs
new file mode 100755
index 0000000..5a571a9
--- /dev/null
+++ b/src/apis/configuration.rs
@@ -0,0 +1,69 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use hyper;
+use hyper_util::client::legacy::Client;
+use hyper_util::client::legacy::connect::Connect;
+use hyper_util::client::legacy::connect::HttpConnector;
+use hyper_util::rt::TokioExecutor;
+
+pub struct Configuration
+ where C: Clone + std::marker::Send + Sync + 'static {
+ pub base_path: String,
+ pub user_agent: Option,
+ pub client: Client,
+ pub basic_auth: Option,
+ pub oauth_access_token: Option,
+ pub api_key: Option,
+ // TODO: take an oauth2 token source, similar to the go one
+}
+
+pub type BasicAuth = (String, Option);
+
+pub struct ApiKey {
+ pub prefix: Option,
+ pub key: String,
+}
+
+impl Configuration {
+ /// Construct a default [`Configuration`](Self) with a hyper client using a default
+ /// [`HttpConnector`](hyper_util::client::legacy::connect::HttpConnector).
+ ///
+ /// Use [`with_client`](Configuration::with_client) to construct a Configuration with a
+ /// custom hyper client.
+ ///
+ pub fn new() -> Configuration {
+ Configuration::default()
+ }
+}
+
+impl Configuration
+ where C: Clone + std::marker::Send + Sync {
+
+ /// Construct a new Configuration with a custom hyper client.
+ ///
+ pub fn with_client(client: Client) -> Configuration {
+ Configuration {
+ base_path: "http://127.0.0.1:9308".to_owned(),
+ user_agent: Some("OpenAPI-Generator/5.0.0/rust".to_owned()),
+ client,
+ basic_auth: None,
+ oauth_access_token: None,
+ api_key: None,
+ }
+ }
+}
+
+impl Default for Configuration {
+ fn default() -> Self {
+ let client = Client::builder(TokioExecutor::new()).build_http();
+ Configuration::with_client(client)
+ }
+}
diff --git a/src/apis/index_api.rs b/src/apis/index_api.rs
new file mode 100755
index 0000000..9086edf
--- /dev/null
+++ b/src/apis/index_api.rs
@@ -0,0 +1,106 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::sync::Arc;
+use std::borrow::Borrow;
+use std::pin::Pin;
+#[allow(unused_imports)]
+use std::option::Option;
+
+use hyper;
+use hyper_util::client::legacy::connect::Connect;
+use futures::Future;
+
+use crate::models;
+use super::{Error, configuration};
+use super::request as __internal_request;
+
+pub struct IndexApiClient
+ where C: Clone + std::marker::Send + Sync + 'static {
+ configuration: Arc>,
+}
+
+impl IndexApiClient
+ where C: Clone + std::marker::Send + Sync {
+ pub fn new(configuration: Arc>) -> IndexApiClient {
+ IndexApiClient {
+ configuration,
+ }
+ }
+}
+
+pub trait IndexApi: Send + Sync {
+ fn bulk(&self, body: &str) -> Pin> + Send>>;
+ fn delete(&self, delete_document_request: models::DeleteDocumentRequest) -> Pin> + Send>>;
+ fn insert(&self, insert_document_request: models::InsertDocumentRequest) -> Pin> + Send>>;
+ fn partial_replace(&self, table: &str, id: i64, replace_document_request: models::ReplaceDocumentRequest) -> Pin> + Send>>;
+ fn replace(&self, insert_document_request: models::InsertDocumentRequest) -> Pin> + Send>>;
+ fn update(&self, update_document_request: models::UpdateDocumentRequest) -> Pin> + Send>>;
+}
+
+implIndexApi for IndexApiClient
+ where C: Clone + std::marker::Send + Sync {
+ #[allow(unused_mut)]
+ fn bulk(&self, body: &str) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/bulk".to_string())
+ ;
+ req = req.with_body_param(body);
+
+ req.execute(self.configuration.borrow())
+ }
+
+ #[allow(unused_mut)]
+ fn delete(&self, delete_document_request: models::DeleteDocumentRequest) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/delete".to_string())
+ ;
+ req = req.with_body_param(delete_document_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+ #[allow(unused_mut)]
+ fn insert(&self, insert_document_request: models::InsertDocumentRequest) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/insert".to_string())
+ ;
+ req = req.with_body_param(insert_document_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+ #[allow(unused_mut)]
+ fn partial_replace(&self, table: &str, id: i64, replace_document_request: models::ReplaceDocumentRequest) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/{table}/_update/{id}".to_string())
+ ;
+ req = req.with_path_param("table".to_string(), table.to_string());
+ req = req.with_path_param("id".to_string(), id.to_string());
+ req = req.with_body_param(replace_document_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+ #[allow(unused_mut)]
+ fn replace(&self, insert_document_request: models::InsertDocumentRequest) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/replace".to_string())
+ ;
+ req = req.with_body_param(insert_document_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+ #[allow(unused_mut)]
+ fn update(&self, update_document_request: models::UpdateDocumentRequest) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/update".to_string())
+ ;
+ req = req.with_body_param(update_document_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+}
diff --git a/src/apis/mod.rs b/src/apis/mod.rs
new file mode 100755
index 0000000..a099abb
--- /dev/null
+++ b/src/apis/mod.rs
@@ -0,0 +1,77 @@
+use std::fmt;
+use std::fmt::Debug;
+
+use hyper;
+use hyper::http;
+use hyper_util::client::legacy::connect::Connect;
+use serde_json;
+
+#[derive(Debug)]
+pub enum Error {
+ Api(ApiError),
+ Header(http::header::InvalidHeaderValue),
+ Http(http::Error),
+ Hyper(hyper::Error),
+ HyperClient(hyper_util::client::legacy::Error),
+ Serde(serde_json::Error),
+ UriError(http::uri::InvalidUri),
+}
+
+pub struct ApiError {
+ pub code: hyper::StatusCode,
+ pub body: hyper::body::Incoming,
+}
+
+impl Debug for ApiError {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ f.debug_struct("ApiError")
+ .field("code", &self.code)
+ .field("body", &"hyper::body::Incoming")
+ .finish()
+ }
+}
+
+impl From<(hyper::StatusCode, hyper::body::Incoming)> for Error {
+ fn from(e: (hyper::StatusCode, hyper::body::Incoming)) -> Self {
+ Error::Api(ApiError {
+ code: e.0,
+ body: e.1,
+ })
+ }
+}
+
+impl From for Error {
+ fn from(e: http::Error) -> Self {
+ Error::Http(e)
+ }
+}
+
+impl From for Error {
+ fn from(e: hyper_util::client::legacy::Error) -> Self {
+ Error::HyperClient(e)
+ }
+}
+
+impl From for Error {
+ fn from(e: hyper::Error) -> Self {
+ Error::Hyper(e)
+ }
+}
+
+impl From for Error {
+ fn from(e: serde_json::Error) -> Self {
+ Error::Serde(e)
+ }
+}
+
+mod request;
+
+mod index_api;
+pub use self::index_api::{ IndexApi, IndexApiClient };
+mod search_api;
+pub use self::search_api::{ SearchApi, SearchApiClient };
+mod utils_api;
+pub use self::utils_api::{ UtilsApi, UtilsApiClient };
+
+pub mod configuration;
+pub mod client;
diff --git a/src/apis/request.rs b/src/apis/request.rs
new file mode 100755
index 0000000..faa57b8
--- /dev/null
+++ b/src/apis/request.rs
@@ -0,0 +1,264 @@
+use std::collections::HashMap;
+use std::pin::Pin;
+
+use fancy_regex::Regex;
+use futures;
+use futures::Future;
+use futures::future::*;
+use http_body_util::BodyExt;
+use hyper;
+use hyper_util::client::legacy::connect::Connect;
+use hyper::header::{AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, HeaderValue, USER_AGENT};
+use serde;
+use serde_json;
+
+use super::{configuration, Error};
+
+pub(crate) struct ApiKey {
+ pub in_header: bool,
+ pub in_query: bool,
+ pub param_name: String,
+}
+
+impl ApiKey {
+ fn key(&self, prefix: &Option, key: &str) -> String {
+ match prefix {
+ None => key.to_owned(),
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ }
+ }
+}
+
+#[allow(dead_code)]
+pub(crate) enum Auth {
+ None,
+ ApiKey(ApiKey),
+ Basic,
+ Oauth,
+}
+
+/// If the authorization type is unspecified then it will be automatically detected based
+/// on the configuration. This functionality is useful when the OpenAPI definition does not
+/// include an authorization scheme.
+pub(crate) struct Request {
+ auth: Option,
+ method: hyper::Method,
+ path: String,
+ query_params: HashMap,
+ no_return_type: bool,
+ path_params: HashMap,
+ form_params: HashMap,
+ header_params: HashMap,
+ // TODO: multiple body params are possible technically, but not supported here.
+ serialized_body: Option,
+}
+
+#[allow(dead_code)]
+impl Request {
+ pub fn new(method: hyper::Method, path: String) -> Self {
+ Request {
+ auth: None,
+ method,
+ path,
+ query_params: HashMap::new(),
+ path_params: HashMap::new(),
+ form_params: HashMap::new(),
+ header_params: HashMap::new(),
+ serialized_body: None,
+ no_return_type: false,
+ }
+ }
+
+ pub fn with_body_param(mut self, param: T) -> Self {
+ self.serialized_body = Some(serde_json::to_string(¶m).unwrap());
+ self
+ }
+
+ pub fn with_header_param(mut self, basename: String, param: String) -> Self {
+ self.header_params.insert(basename, param);
+ self
+ }
+
+ #[allow(unused)]
+ pub fn with_query_param(mut self, basename: String, param: String) -> Self {
+ self.query_params.insert(basename, param);
+ self
+ }
+
+ #[allow(unused)]
+ pub fn with_path_param(mut self, basename: String, param: String) -> Self {
+ self.path_params.insert(basename, param);
+ self
+ }
+
+ #[allow(unused)]
+ pub fn with_form_param(mut self, basename: String, param: String) -> Self {
+ self.form_params.insert(basename, param);
+ self
+ }
+
+ pub fn returns_nothing(mut self) -> Self {
+ self.no_return_type = true;
+ self
+ }
+
+ pub fn with_auth(mut self, auth: Auth) -> Self {
+ self.auth = Some(auth);
+ self
+ }
+
+ pub fn execute<'a, C, U>(
+ self,
+ conf: &configuration::Configuration,
+ ) -> Pin> + 'a + Send>>
+ where
+ C: Connect + Clone + std::marker::Send + Sync,
+ U: Sized + std::marker::Send + 'a,
+ for<'de> U: serde::Deserialize<'de>,
+ {
+ let mut query_string = ::url::form_urlencoded::Serializer::new("".to_owned());
+
+ let mut path = self.path;
+ for (k, v) in self.path_params {
+ // replace {id} with the value of the id path param
+ path = path.replace(&format!("{{{}}}", k), &v);
+ }
+
+ for (key, val) in self.query_params {
+ query_string.append_pair(&key, &val);
+ }
+
+ let mut uri_str = format!("{}{}", conf.base_path, path);
+
+ let query_string_str = query_string.finish();
+ if !query_string_str.is_empty() {
+ uri_str += "?";
+ uri_str += &query_string_str;
+ }
+ let uri: hyper::Uri = match uri_str.parse() {
+ Err(e) => return Box::pin(futures::future::err(Error::UriError(e))),
+ Ok(u) => u,
+ };
+
+ let mut req_builder = hyper::Request::builder()
+ .uri(uri)
+ .method(self.method);
+
+ // Detect the authorization type if it hasn't been set.
+ let auth = self.auth.unwrap_or_else(||
+ if conf.api_key.is_some() {
+ panic!("Cannot automatically set the API key from the configuration, it must be specified in the OpenAPI definition")
+ } else if conf.oauth_access_token.is_some() {
+ Auth::Oauth
+ } else if conf.basic_auth.is_some() {
+ Auth::Basic
+ } else {
+ Auth::None
+ }
+ );
+ match auth {
+ Auth::ApiKey(apikey) => {
+ if let Some(ref key) = conf.api_key {
+ let val = apikey.key(&key.prefix, &key.key);
+ if apikey.in_query {
+ query_string.append_pair(&apikey.param_name, &val);
+ }
+ if apikey.in_header {
+ req_builder = req_builder.header(&apikey.param_name, val);
+ }
+ }
+ }
+ Auth::Basic => {
+ if let Some(ref auth_conf) = conf.basic_auth {
+ let mut text = auth_conf.0.clone();
+ text.push(':');
+ if let Some(ref pass) = auth_conf.1 {
+ text.push_str(&pass[..]);
+ }
+ let encoded = base64::encode(&text);
+ req_builder = req_builder.header(AUTHORIZATION, encoded);
+ }
+ }
+ Auth::Oauth => {
+ if let Some(ref token) = conf.oauth_access_token {
+ let text = "Bearer ".to_owned() + token;
+ req_builder = req_builder.header(AUTHORIZATION, text);
+ }
+ }
+ Auth::None => {}
+ }
+
+ if let Some(ref user_agent) = conf.user_agent {
+ req_builder = req_builder.header(USER_AGENT, match HeaderValue::from_str(user_agent) {
+ Ok(header_value) => header_value,
+ Err(e) => return Box::pin(futures::future::err(super::Error::Header(e)))
+ });
+ }
+
+ for (k, v) in self.header_params {
+ req_builder = req_builder.header(&k, v);
+ }
+
+ let req_headers = req_builder.headers_mut().unwrap();
+ let request_result = if self.form_params.len() > 0 {
+ req_headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/x-www-form-urlencoded"));
+ let mut enc = ::url::form_urlencoded::Serializer::new("".to_owned());
+ for (k, v) in self.form_params {
+ enc.append_pair(&k, &v);
+ }
+ req_builder.body(enc.finish())
+ } else if let Some(body) = self.serialized_body {
+ let req_len;
+ let mut req_body;
+ let content_type;
+ if body[0..1] == "\"".to_string() {
+ req_len = body.len()-2;
+ req_body = body[1..body.len()-1].to_string();
+ } else {
+ req_len = body.len();
+ req_body = body.to_string();
+ }
+ if path == "/bulk".to_string() {
+ content_type = HeaderValue::from_static("application/x-ndjson");
+ let re = Regex::new(r#"(? request,
+ Err(e) => return Box::pin(futures::future::err(Error::from(e)))
+ };
+ let no_return_type = self.no_return_type;
+ Box::pin(conf.client
+ .request(request)
+ .map_err(|e| Error::from(e))
+ .and_then(move |response| {
+ let status = response.status();
+ if !status.is_success() {
+ futures::future::err::(Error::from((status, response.into_body()))).boxed()
+ } else if no_return_type {
+ // This is a hack; if there's no_ret_type, U is (), but serde_json gives an
+ // error when deserializing "" into (), so deserialize 'null' into it
+ // instead.
+ // An alternate option would be to require U: Default, and then return
+ // U::default() here instead since () implements that, but then we'd
+ // need to impl default for all models.
+ futures::future::ok::(serde_json::from_str("null").expect("serde null value")).boxed()
+ } else {
+ let collect = response.into_body().collect().map_err(Error::from);
+ collect.map(|collected| {
+ collected.and_then(|collected| {
+ serde_json::from_slice(&collected.to_bytes()).map_err(Error::from)
+ })
+ }).boxed()
+ }
+ }))
+ }
+}
diff --git a/src/apis/search_api.rs b/src/apis/search_api.rs
new file mode 100755
index 0000000..f9ad6ce
--- /dev/null
+++ b/src/apis/search_api.rs
@@ -0,0 +1,75 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::sync::Arc;
+use std::borrow::Borrow;
+use std::pin::Pin;
+#[allow(unused_imports)]
+use std::option::Option;
+
+use hyper;
+use hyper_util::client::legacy::connect::Connect;
+use futures::Future;
+
+use crate::models;
+use super::{Error, configuration};
+use super::request as __internal_request;
+
+pub struct SearchApiClient
+ where C: Clone + std::marker::Send + Sync + 'static {
+ configuration: Arc>,
+}
+
+impl SearchApiClient
+ where C: Clone + std::marker::Send + Sync {
+ pub fn new(configuration: Arc>) -> SearchApiClient {
+ SearchApiClient {
+ configuration,
+ }
+ }
+}
+
+pub trait SearchApi: Send + Sync {
+ fn autocomplete(&self, autocomplete_request: models::AutocompleteRequest) -> Pin, Error>> + Send>>;
+ fn percolate(&self, table: &str, percolate_request: models::PercolateRequest) -> Pin> + Send>>;
+ fn search(&self, search_request: models::SearchRequest) -> Pin> + Send>>;
+}
+
+implSearchApi for SearchApiClient
+ where C: Clone + std::marker::Send + Sync {
+ #[allow(unused_mut)]
+ fn autocomplete(&self, autocomplete_request: models::AutocompleteRequest) -> Pin, Error>> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/autocomplete".to_string())
+ ;
+ req = req.with_body_param(autocomplete_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+ #[allow(unused_mut)]
+ fn percolate(&self, table: &str, percolate_request: models::PercolateRequest) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/pq/{table}/search".to_string())
+ ;
+ req = req.with_path_param("table".to_string(), table.to_string());
+ req = req.with_body_param(percolate_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+ #[allow(unused_mut)]
+ fn search(&self, search_request: models::SearchRequest) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/search".to_string())
+ ;
+ req = req.with_body_param(search_request);
+
+ req.execute(self.configuration.borrow())
+ }
+
+}
diff --git a/src/apis/utils_api.rs b/src/apis/utils_api.rs
new file mode 100755
index 0000000..5f82886
--- /dev/null
+++ b/src/apis/utils_api.rs
@@ -0,0 +1,58 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::sync::Arc;
+use std::borrow::Borrow;
+use std::pin::Pin;
+#[allow(unused_imports)]
+use std::option::Option;
+
+use hyper;
+use hyper_util::client::legacy::connect::Connect;
+use futures::Future;
+
+use crate::models;
+use super::{Error, configuration};
+use super::request as __internal_request;
+
+pub struct UtilsApiClient
+ where C: Clone + std::marker::Send + Sync + 'static {
+ configuration: Arc>,
+}
+
+impl UtilsApiClient
+ where C: Clone + std::marker::Send + Sync {
+ pub fn new(configuration: Arc>) -> UtilsApiClient {
+ UtilsApiClient {
+ configuration,
+ }
+ }
+}
+
+pub trait UtilsApi: Send + Sync {
+ fn sql(&self, body: &str, raw_response: Option) -> Pin> + Send>>;
+}
+
+implUtilsApi for UtilsApiClient
+ where C: Clone + std::marker::Send + Sync {
+ #[allow(unused_mut)]
+ fn sql(&self, body: &str, raw_response: Option) -> Pin> + Send>> {
+ let mut req = __internal_request::Request::new(hyper::Method::POST, "/sql".to_string())
+ ;
+ if let Some(ref s) = raw_response {
+ let query_value = s.to_string();
+ req = req.with_query_param("raw_response".to_string(), query_value);
+ }
+ req = req.with_body_param(body);
+
+ req.execute(self.configuration.borrow())
+ }
+
+}
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100755
index 0000000..f5cfd23
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,12 @@
+#![allow(unused_imports)]
+#![allow(clippy::too_many_arguments)]
+
+extern crate serde_repr;
+extern crate serde;
+extern crate serde_json;
+extern crate url;
+extern crate hyper;
+extern crate futures;
+
+pub mod apis;
+pub mod models;
diff --git a/src/models/_match.rs b/src/models/_match.rs
new file mode 100755
index 0000000..6e35716
--- /dev/null
+++ b/src/models/_match.rs
@@ -0,0 +1,49 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// Match : Filter helper object defining a match keyword and match options
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct Match {
+ #[serde(rename = "query")]
+ pub query: String,
+ #[serde(rename = "operator", skip_serializing_if = "Option::is_none")]
+ pub operator: Option,
+ #[serde(rename = "boost", skip_serializing_if = "Option::is_none")]
+ pub boost: Option,
+}
+
+impl Match {
+ /// Filter helper object defining a match keyword and match options
+ pub fn new(query: String) -> Match {
+ Match {
+ query,
+ operator: None,
+ boost: None,
+ }
+ }
+}
+///
+#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
+pub enum Operator {
+ #[serde(rename = "or")]
+ Or,
+ #[serde(rename = "and")]
+ And,
+}
+
+impl Default for Operator {
+ fn default() -> Operator {
+ Self::Or
+ }
+}
+
diff --git a/src/models/agg_composite.rs b/src/models/agg_composite.rs
new file mode 100755
index 0000000..0b3d679
--- /dev/null
+++ b/src/models/agg_composite.rs
@@ -0,0 +1,33 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// AggComposite : Object to perform composite aggregation, i.e., grouping search results by multiple fields
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct AggComposite {
+ /// Maximum number of composite buckets in the result
+ #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
+ pub size: Option,
+ #[serde(rename = "sources", skip_serializing_if = "Option::is_none")]
+ pub sources: Option>>,
+}
+
+impl AggComposite {
+ /// Object to perform composite aggregation, i.e., grouping search results by multiple fields
+ pub fn new() -> AggComposite {
+ AggComposite {
+ size: None,
+ sources: None,
+ }
+ }
+}
+
diff --git a/src/models/agg_composite_source.rs b/src/models/agg_composite_source.rs
new file mode 100755
index 0000000..5a7f5ef
--- /dev/null
+++ b/src/models/agg_composite_source.rs
@@ -0,0 +1,29 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// AggCompositeSource : Object containing terms used for composite aggregation.
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct AggCompositeSource {
+ #[serde(rename = "terms")]
+ pub terms: Box,
+}
+
+impl AggCompositeSource {
+ /// Object containing terms used for composite aggregation.
+ pub fn new(terms: crate::models::AggCompositeTerm) -> AggCompositeSource {
+ AggCompositeSource {
+ terms: Box::new(terms),
+ }
+ }
+}
+
diff --git a/src/models/agg_composite_term.rs b/src/models/agg_composite_term.rs
new file mode 100755
index 0000000..b1118a1
--- /dev/null
+++ b/src/models/agg_composite_term.rs
@@ -0,0 +1,30 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// AggCompositeTerm : Object representing a term to be used in composite aggregation.
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct AggCompositeTerm {
+ /// Name of field to operate with
+ #[serde(rename = "field")]
+ pub field: String,
+}
+
+impl AggCompositeTerm {
+ /// Object representing a term to be used in composite aggregation.
+ pub fn new(field: String) -> AggCompositeTerm {
+ AggCompositeTerm {
+ field,
+ }
+ }
+}
+
diff --git a/src/models/agg_terms.rs b/src/models/agg_terms.rs
new file mode 100755
index 0000000..c0980d2
--- /dev/null
+++ b/src/models/agg_terms.rs
@@ -0,0 +1,34 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// AggTerms : Object containing term fields to aggregate on
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct AggTerms {
+ /// Name of attribute to aggregate by
+ #[serde(rename = "field")]
+ pub field: String,
+ /// Maximum number of buckets in the result
+ #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
+ pub size: Option,
+}
+
+impl AggTerms {
+ /// Object containing term fields to aggregate on
+ pub fn new(field: String) -> AggTerms {
+ AggTerms {
+ field,
+ size: None,
+ }
+ }
+}
+
diff --git a/src/models/aggregation.rs b/src/models/aggregation.rs
new file mode 100755
index 0000000..0fc86bd
--- /dev/null
+++ b/src/models/aggregation.rs
@@ -0,0 +1,33 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct Aggregation {
+ #[serde(rename = "terms", skip_serializing_if = "Option::is_none")]
+ pub terms: Option>,
+ #[serde(rename = "sort", skip_serializing_if = "Option::is_none")]
+ pub sort: Option>,
+ #[serde(rename = "composite", skip_serializing_if = "Option::is_none")]
+ pub composite: Option>,
+}
+
+impl Aggregation {
+ pub fn new() -> Aggregation {
+ Aggregation {
+ terms: None,
+ sort: None,
+ composite: None,
+ }
+ }
+}
+
diff --git a/src/models/autocomplete_request.rs b/src/models/autocomplete_request.rs
new file mode 100755
index 0000000..46a6f57
--- /dev/null
+++ b/src/models/autocomplete_request.rs
@@ -0,0 +1,38 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// AutocompleteRequest : Object containing the data for performing an autocomplete search.
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct AutocompleteRequest {
+ /// The table to perform the search on
+ #[serde(rename = "table")]
+ pub table: String,
+ /// The beginning of the string to autocomplete
+ #[serde(rename = "query")]
+ pub query: String,
+ /// Autocomplete options - layouts: A comma-separated string of keyboard layout codes to validate and check for spell correction. Available options - us, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be. By default, all are enabled. - fuzziness: (0,1 or 2) Maximum Levenshtein distance for finding typos. Set to 0 to disable fuzzy matching. Default is 2 - prepend: true/false If true, adds an asterisk before the last word for prefix expansion (e.g., *word ) - append: true/false If true, adds an asterisk after the last word for prefix expansion (e.g., word* ) - expansion_len: Number of characters to expand in the last word. Default is 10.
+ #[serde(rename = "options", skip_serializing_if = "Option::is_none")]
+ pub options: Option,
+}
+
+impl AutocompleteRequest {
+ /// Object containing the data for performing an autocomplete search.
+ pub fn new(table: String, query: String) -> AutocompleteRequest {
+ AutocompleteRequest {
+ table,
+ query,
+ options: None,
+ }
+ }
+}
+
diff --git a/src/models/bool_filter.rs b/src/models/bool_filter.rs
new file mode 100755
index 0000000..bbdf948
--- /dev/null
+++ b/src/models/bool_filter.rs
@@ -0,0 +1,36 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct BoolFilter {
+ /// Query clauses that must match for the document to be included
+ #[serde(rename = "must", skip_serializing_if = "Option::is_none")]
+ pub must: Option>,
+ /// Query clauses that must not match for the document to be included
+ #[serde(rename = "must_not", skip_serializing_if = "Option::is_none")]
+ pub must_not: Option>,
+ /// Query clauses that should be matched, but are not required
+ #[serde(rename = "should", skip_serializing_if = "Option::is_none")]
+ pub should: Option>,
+}
+
+impl BoolFilter {
+ pub fn new() -> BoolFilter {
+ BoolFilter {
+ must: None,
+ must_not: None,
+ should: None,
+ }
+ }
+}
+
diff --git a/src/models/bulk_response.rs b/src/models/bulk_response.rs
new file mode 100755
index 0000000..b3127b0
--- /dev/null
+++ b/src/models/bulk_response.rs
@@ -0,0 +1,46 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// BulkResponse : Success response for bulk search requests
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct BulkResponse {
+ /// List of results
+ #[serde(rename = "items", skip_serializing_if = "Option::is_none")]
+ pub items: Option>,
+ /// Errors occurred during the bulk operation
+ #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
+ pub errors: Option,
+ /// Error message describing an error if such occurred
+ #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
+ pub error: Option,
+ /// Number of the row returned in the response
+ #[serde(rename = "current_line", skip_serializing_if = "Option::is_none")]
+ pub current_line: Option,
+ /// Number of rows skipped in the response
+ #[serde(rename = "skipped_lines", skip_serializing_if = "Option::is_none")]
+ pub skipped_lines: Option,
+}
+
+impl BulkResponse {
+ /// Success response for bulk search requests
+ pub fn new() -> BulkResponse {
+ BulkResponse {
+ items: None,
+ errors: None,
+ error: None,
+ current_line: None,
+ skipped_lines: None,
+ }
+ }
+}
+
diff --git a/src/models/delete_document_request.rs b/src/models/delete_document_request.rs
new file mode 100755
index 0000000..da5ece3
--- /dev/null
+++ b/src/models/delete_document_request.rs
@@ -0,0 +1,42 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// DeleteDocumentRequest : Payload for delete request. Documents can be deleted either one by one by specifying the document id or by providing a query object. For more information see [Delete API](https://manual.manticoresearch.com/Deleting_documents)
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct DeleteDocumentRequest {
+ /// Table name
+ #[serde(rename = "table")]
+ pub table: String,
+ /// Cluster name
+ #[serde(rename = "cluster", skip_serializing_if = "Option::is_none")]
+ pub cluster: Option,
+ /// The ID of document for deletion
+ #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
+ pub id: Option,
+ /// Defines the criteria to match documents for deletion
+ #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
+ pub query: Option,
+}
+
+impl DeleteDocumentRequest {
+ /// Payload for delete request. Documents can be deleted either one by one by specifying the document id or by providing a query object. For more information see [Delete API](https://manual.manticoresearch.com/Deleting_documents)
+ pub fn new(table: String) -> DeleteDocumentRequest {
+ DeleteDocumentRequest {
+ table,
+ cluster: None,
+ id: None,
+ query: None,
+ }
+ }
+}
+
diff --git a/src/models/delete_response.rs b/src/models/delete_response.rs
new file mode 100755
index 0000000..6719a6e
--- /dev/null
+++ b/src/models/delete_response.rs
@@ -0,0 +1,46 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// DeleteResponse : Response object for successful delete request
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct DeleteResponse {
+ /// The name of the table from which the document was deleted
+ #[serde(rename = "table", skip_serializing_if = "Option::is_none")]
+ pub table: Option,
+ /// Number of documents deleted
+ #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
+ pub deleted: Option,
+ /// The ID of the deleted document. If multiple documents are deleted, the ID of the first deleted document is returned
+ #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
+ pub id: Option,
+ /// Indicates whether any documents to be deleted were found
+ #[serde(rename = "found", skip_serializing_if = "Option::is_none")]
+ pub found: Option,
+ /// Result of the delete operation, typically 'deleted'
+ #[serde(rename = "result", skip_serializing_if = "Option::is_none")]
+ pub result: Option,
+}
+
+impl DeleteResponse {
+ /// Response object for successful delete request
+ pub fn new() -> DeleteResponse {
+ DeleteResponse {
+ table: None,
+ deleted: None,
+ id: None,
+ found: None,
+ result: None,
+ }
+ }
+}
+
diff --git a/src/models/error_response.rs b/src/models/error_response.rs
new file mode 100755
index 0000000..425758a
--- /dev/null
+++ b/src/models/error_response.rs
@@ -0,0 +1,33 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// ErrorResponse : Error response object containing information about the error and a status code
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct ErrorResponse {
+ #[serde(rename = "error")]
+ pub error: Box,
+ /// HTTP status code of the error response
+ #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
+ pub status: Option,
+}
+
+impl ErrorResponse {
+ /// Error response object containing information about the error and a status code
+ pub fn new(error: crate::models::ResponseError) -> ErrorResponse {
+ ErrorResponse {
+ error: Box::new(error),
+ status: None,
+ }
+ }
+}
+
diff --git a/src/models/fulltext_filter.rs b/src/models/fulltext_filter.rs
new file mode 100755
index 0000000..6adc29b
--- /dev/null
+++ b/src/models/fulltext_filter.rs
@@ -0,0 +1,42 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// FulltextFilter : Defines a type of filter for full-text search queries
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct FulltextFilter {
+ /// Filter object defining a query string
+ #[serde(rename = "query_string", skip_serializing_if = "Option::is_none")]
+ pub query_string: Option,
+ /// Filter object defining a match keyword passed as a string or in a Match object
+ #[serde(rename = "match", skip_serializing_if = "Option::is_none")]
+ pub r#match: Option,
+ /// Filter object defining a match phrase
+ #[serde(rename = "match_phrase", skip_serializing_if = "Option::is_none")]
+ pub match_phrase: Option,
+ /// Filter object to select all documents
+ #[serde(rename = "match_all", skip_serializing_if = "Option::is_none")]
+ pub match_all: Option,
+}
+
+impl FulltextFilter {
+ /// Defines a type of filter for full-text search queries
+ pub fn new() -> FulltextFilter {
+ FulltextFilter {
+ query_string: None,
+ r#match: None,
+ match_phrase: None,
+ match_all: None,
+ }
+ }
+}
+
diff --git a/src/models/geo_distance.rs b/src/models/geo_distance.rs
new file mode 100755
index 0000000..0f09c7b
--- /dev/null
+++ b/src/models/geo_distance.rs
@@ -0,0 +1,55 @@
+/*
+ * Manticore Search Client
+ *
+ * Сlient for Manticore Search.
+ *
+ * The version of the OpenAPI document: 5.0.0
+ * Contact: info@manticoresearch.com
+ * Generated by: https://openapi-generator.tech
+ */
+
+use crate::models;
+use serde::{Deserialize, Serialize};
+
+/// GeoDistance : Object to perform geo-distance based filtering on queries
+#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
+pub struct GeoDistance {
+ #[serde(rename = "location_anchor", skip_serializing_if = "Option::is_none")]
+ pub location_anchor: Option>,
+ /// Field name in the document that contains location data
+ #[serde(rename = "location_source", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
+ pub location_source: Option