{"id":30029892,"url":"https://github.com/manticoresoftware/manticoresearch-rust","last_synced_at":"2025-08-06T18:03:57.139Z","repository":{"id":283213889,"uuid":"950470474","full_name":"manticoresoftware/manticoresearch-rust","owner":"manticoresoftware","description":"Rust client for Manticore Search","archived":false,"fork":false,"pushed_at":"2025-07-30T07:25:43.000Z","size":116,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-30T09:31:15.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manticoresoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-18T08:03:01.000Z","updated_at":"2025-07-30T07:25:46.000Z","dependencies_parsed_at":"2025-03-19T05:28:52.354Z","dependency_job_id":"e6bee525-8294-4073-81c8-29edab1decd4","html_url":"https://github.com/manticoresoftware/manticoresearch-rust","commit_stats":null,"previous_names":["manticoresoftware/manticoresearch-rust"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/manticoresoftware/manticoresearch-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manticoresoftware","download_url":"https://codeload.github.com/manticoresoftware/manticoresearch-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-rust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269127970,"owners_count":24364927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-06T18:03:10.205Z","updated_at":"2025-08-06T18:03:57.100Z","avatar_url":"https://github.com/manticoresoftware.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Manticore Rust client\n\n❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-rust/tree/1.1.0\n\nFor more information, please visit [https://manticoresearch.com/contact-us/](https://manticoresearch.com/contact-us/)\n\n## Overview\n\nThis 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.\n\n- API version: 5.0.0\n- Package version: 1.1.0\n- Generator version: 7.14.0\n- Build package: `org.openapitools.codegen.languages.RustClientCodegen`\n\n## Installation\n\nPut the package under your project folder in a directory named `manticoresearch` and add the following to `Cargo.toml` under `[dependencies]`:\n\n```\nmanticoresearch = { path = \"./manticoresearch\" }\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *http://127.0.0.1:9308*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*IndexApi* | [**bulk**](docs/IndexApi.md#bulk) | **Post** /bulk | Bulk table operations\n*IndexApi* | [**delete**](docs/IndexApi.md#delete) | **Post** /delete | Delete a document in a table\n*IndexApi* | [**insert**](docs/IndexApi.md#insert) | **Post** /insert | Create a new document in a table\n*IndexApi* | [**partial_replace**](docs/IndexApi.md#partial_replace) | **Post** /{table}/_update/{id} | Partially replaces a document in a table\n*IndexApi* | [**replace**](docs/IndexApi.md#replace) | **Post** /replace | Replace new document in a table\n*IndexApi* | [**update**](docs/IndexApi.md#update) | **Post** /update | Update a document in a table\n*SearchApi* | [**autocomplete**](docs/SearchApi.md#autocomplete) | **Post** /autocomplete | Performs an autocomplete search on a table\n*SearchApi* | [**percolate**](docs/SearchApi.md#percolate) | **Post** /pq/{table}/search | Perform reverse search on a percolate table\n*SearchApi* | [**search**](docs/SearchApi.md#search) | **Post** /search | Performs a search on a table\n*UtilsApi* | [**sql**](docs/UtilsApi.md#sql) | **Post** /sql | Perform SQL requests\n\n\n## Documentation For Models\n\n - [AggComposite](docs/AggComposite.md)\n - [AggCompositeSource](docs/AggCompositeSource.md)\n - [AggCompositeTerm](docs/AggCompositeTerm.md)\n - [AggDateHistogram](docs/AggDateHistogram.md)\n - [AggHistogram](docs/AggHistogram.md)\n - [AggTerms](docs/AggTerms.md)\n - [Aggregation](docs/Aggregation.md)\n - [AutocompleteRequest](docs/AutocompleteRequest.md)\n - [BoolFilter](docs/BoolFilter.md)\n - [BulkResponse](docs/BulkResponse.md)\n - [DeleteDocumentRequest](docs/DeleteDocumentRequest.md)\n - [DeleteResponse](docs/DeleteResponse.md)\n - [ErrorResponse](docs/ErrorResponse.md)\n - [FulltextFilter](docs/FulltextFilter.md)\n - [GeoDistance](docs/GeoDistance.md)\n - [GeoDistanceLocationAnchor](docs/GeoDistanceLocationAnchor.md)\n - [Highlight](docs/Highlight.md)\n - [HighlightFieldOption](docs/HighlightFieldOption.md)\n - [HighlightFields](docs/HighlightFields.md)\n - [HitsHits](docs/HitsHits.md)\n - [InsertDocumentRequest](docs/InsertDocumentRequest.md)\n - [Join](docs/Join.md)\n - [JoinCond](docs/JoinCond.md)\n - [JoinOn](docs/JoinOn.md)\n - [KnnQuery](docs/KnnQuery.md)\n - [Match](docs/Match.md)\n - [MatchAll](docs/MatchAll.md)\n - [PercolateRequest](docs/PercolateRequest.md)\n - [PercolateRequestQuery](docs/PercolateRequestQuery.md)\n - [QueryFilter](docs/QueryFilter.md)\n - [Range](docs/Range.md)\n - [ReplaceDocumentRequest](docs/ReplaceDocumentRequest.md)\n - [ResponseError](docs/ResponseError.md)\n - [ResponseErrorDetails](docs/ResponseErrorDetails.md)\n - [SearchQuery](docs/SearchQuery.md)\n - [SearchRequest](docs/SearchRequest.md)\n - [SearchResponse](docs/SearchResponse.md)\n - [SearchResponseHits](docs/SearchResponseHits.md)\n - [SourceRules](docs/SourceRules.md)\n - [SqlObjResponse](docs/SqlObjResponse.md)\n - [SqlResponse](docs/SqlResponse.md)\n - [SuccessResponse](docs/SuccessResponse.md)\n - [UpdateDocumentRequest](docs/UpdateDocumentRequest.md)\n - [UpdateResponse](docs/UpdateResponse.md)\n\n\nTo get access to the crate's generated documentation, use:\n\n```\ncargo doc --open\n```\n\n## Getting started\n\n```rust\n\nuse std::sync::Arc;\nuse std::collections::HashMap;\nuse serde_json;\nuse http_body_util::BodyExt;\nuse tokio;\nuse manticoresearch::{\n    apis::{\n        {Error,configuration::Configuration,IndexApi,IndexApiClient,SearchApi,SearchApiClient,UtilsApi,UtilsApiClient}\n    },\n    models::{SearchRequest,SearchQuery,Highlight}\n};\n\n\n#[tokio::main]\nasync fn main() {\n    let api_config = Arc::new(Configuration::new());\n    let utils_api = UtilsApiClient::new(api_config.clone());\n    let index_api = IndexApiClient::new(api_config.clone());\n    let search_api = SearchApiClient::new(api_config.clone());\n\n    // Drop table if it exists\n    let _ = utils_api.sql(\"DROP TABLE IF EXISTS movies\", Some(true)).await;\n    \n    // Create table\n    let _ = utils_api\n        .sql(\n            \"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')\",\n            Some(true),\n        )\n        .await;\n    \n    // Bulk insert documents\n    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]}}}\n{\"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]}}}\n{\"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]}}}\n{\"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]}}}\n\"#;\n\n    let _ = index_api.bulk(bulk_body).await;\n    \n    // Prepare search request\n    let query = SearchQuery {\n        query_string: Some(serde_json::json!(\"Star\").into()),\n        ..Default::default()\n    };\n\n    let highlight = Highlight {\n        fields: Some(serde_json::json!([\"title\"]).into()),\n        ..Default::default()\n    };\n\n    let mut options = HashMap::new();\n    options.insert(\"cutoff\".to_string(), serde_json::json!(5));\n    options.insert(\"ranker\".to_string(), serde_json::json!(\"bm25\"));\n\n    let search_request = SearchRequest {\n        table: \"movies\".to_string(),\n        query: Some(Box::new(query)),\n        highlight: Some(Box::new(highlight)),\n        options: Some(serde_json::json!(options)),\n        ..Default::default()\n    };\n\n    // Perform search\n    let res = search_api.search(search_request).await;\n    \n    let _ = match res {\n        Ok(result) =\u003e {\n            println!(\"Search result: {:?}\", result)        \n        },\n        Err(error) =\u003e {\n            if let Error::Api(error_info) = error {\n                let body_bytes = error_info.body.collect().await.expect(\"ERROR RESPONSE\").to_bytes();\n                println!(\"Error response: {:?}\", String::from_utf8(body_bytes.to_vec()).unwrap())\n            }\n        }\n    };\n    \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fmanticoresearch-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanticoresoftware%2Fmanticoresearch-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fmanticoresearch-rust/lists"}