{"id":20528247,"url":"https://github.com/manticoresoftware/manticoresearch-net","last_synced_at":"2025-04-14T04:51:01.554Z","repository":{"id":59376920,"uuid":"470444057","full_name":"manticoresoftware/manticoresearch-net","owner":"manticoresoftware","description":"Official .NET client for Manticore Search","archived":false,"fork":false,"pushed_at":"2025-02-13T07:56:46.000Z","size":385,"stargazers_count":37,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T18:52:25.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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":"2022-03-16T05:25:35.000Z","updated_at":"2025-03-25T10:25:21.000Z","dependencies_parsed_at":"2023-01-18T10:04:55.554Z","dependency_job_id":"3b92a0c6-b530-4626-851d-60855d9b8431","html_url":"https://github.com/manticoresoftware/manticoresearch-net","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fmanticoresearch-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manticoresoftware","download_url":"https://codeload.github.com/manticoresoftware/manticoresearch-net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824693,"owners_count":21167343,"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","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":"2024-11-15T23:24:10.342Z","updated_at":"2025-04-14T04:51:01.546Z","avatar_url":"https://github.com/manticoresoftware.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Manticore .Net client\n\n❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-net/tree/8.0.0\n\n- API version: 5.0.0\n- Build package: org.openapitools.codegen.languages.CSharpClientCodegen\n    For more information, please visit [https://manticoresearch.com/contact-us/](https://manticoresearch.com/contact-us/)\n\n\u003ca id=\"frameworks-supported\"\u003e\u003c/a\u003e\n## Frameworks supported\n- .NET Core \u003e=1.0\n- .NET Framework \u003e=4.6\n- Mono/Xamarin \u003e=vNext\n\n\u003ca id=\"dependencies\"\u003e\u003c/a\u003e\n## Dependencies\n\n- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later\n- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later\n- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later\n\nThe DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:\n\n| **manticoresearch-net*  | **Manticore Search**                | **Compatibility**       |\n| ------------------------| ----------------------------------- | ------------------------|\n| `manticoresearch-dev`   | `dev` (latest development version)  | ✅ Fully Compatible     |\n| 8.0.0 or newer          | 9.2.14 or newer                     | ✅ Fully Compatible     |\n| 6.0.0 to 8.0.0          | 9.2.14 or newer                     | ⚠️ Partially Compatible |\n| 6.0.0 to 8.0.0          | 7.0.0 to 9.2.14                     | ✅ Fully Compatible     |\n| 5.0.0 to 6.0.0          | 7.0.0 to newer                      | ⚠️ Partially Compatible |\n| 5.0.0 to 6.0.0          | 6.3.6 to 7.0.0                      | ✅ Fully Compatible     |\n| 3.3.1 to 5.0.0          | 6.3.6 or newer                      | ⚠️ Partially Compatible |\n| 3.3.1 to 5.0.0          | 6.2.0 to 6.3.6                      | ✅ Fully Compatible     |\n| 1.0.0 to 3.3.1          | 6.2.0 or newer                      | ⚠️ Partially Compatible |\n| 1.0.0 to 3.3.1          | 2.5.1 to 6.2.0                      | ✅ Fully Compatible     |\n\n\n```\nInstall-Package Newtonsoft.Json\nInstall-Package JsonSubTypes\nInstall-Package System.ComponentModel.Annotations\n```\n\u003ca id=\"installation\"\u003e\u003c/a\u003e\n## Installation\n\nGenerate the DLL using your preferred tool (e.g. `dotnet build`)\n\nThen include the DLL (under the `bin` folder) in the C# project, and use the namespaces:\n```csharp\nusing ManticoreSearch.Api;\nusing ManticoreSearch.Client;\nusing ManticoreSearch.Model;\n```\n\n\u003ca id=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\nTo use the API client with a HTTP proxy, setup a `System.Net.WebProxy`\n```csharp\nConfiguration c = new Configuration();\nSystem.Net.WebProxy webProxy = new System.Net.WebProxy(\"http://myProxyUrl:80/\");\nwebProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;\nc.Proxy = webProxy;\n```\n\n### Connections\nEach ApiClass (properly the ApiClient inside it) will create an instance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method.\n\nTo better manager the connections it's a common practice to reuse the HttpClient and HttpClientHandler (see [here](https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests#issues-with-the-original-httpclient-class-available-in-net) for details). To use your own HttpClient instance just pass it to the ApiClass constructor.\n\n```csharp\nHttpClientHandler yourHandler = new HttpClientHandler();\nHttpClient yourHttpClient = new HttpClient(yourHandler);\nvar api = new YourApiClass(yourHttpClient, yourHandler);\n```\n\nIf you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory.\n\n```csharp\nHttpClient yourHttpClient = new HttpClient();\nvar api = new YourApiClass(yourHttpClient);\n```\nYou'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available.\n\nHere an example of DI setup in a sample web project:\n\n```csharp\nservices.AddHttpClient\u003cYourApiClass\u003e(httpClient =\u003e\n   new PetApi(httpClient));\n```\n\n\n\u003ca id=\"getting-started\"\u003e\u003c/a\u003e\n## Getting Started\n\n```csharp\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Net.Http;\nusing ManticoreSearch.Api;\nusing ManticoreSearch.Client;\nusing ManticoreSearch.Model;\n\nnamespace Example\n{\n    public class Example\n    {\n        public static void Main()\n        {\n\n            Configuration config = new Configuration();\n            config.BasePath = \"http://127.0.0.1:9308\";\n            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes\n            HttpClient httpClient = new HttpClient();\n            HttpClientHandler httpClientHandler = new HttpClientHandler();\n            \n            // Perform insert and search operations\n            var indexApi = new IndexApi(httpClient, config, httpClientHandler);\n\t\t\tvar searchApi = new SearchApi(httpClient, config, httpClientHandler);\n            try \n            {\n            \tstring tableName = \"products\";\n\t\n\t\t\t\tDictionary\u003cstring, Object\u003e doc = new Dictionary\u003cstring, Object\u003e(); \n\t\t\t\tdoc.Add(\"title\", \"Crossbody Bag with Tassel\");\n\t\t\t\tdoc.Add(\"price\", 19.85);\n\n                InsertDocumentRequest insertDocumentRequest = new InsertDocumentRequest(Index: \"products\", Doc: doc);\n                indexApi.Insert(insertDocumentRequest);\n\n\t            SearchRequest searchRequest = new SearchRequest(Index: \"products\");\n                                \n                Highlight queryHighlight = new Highlight();\n                List\u003cstring\u003e highlightFields = new List\u003cstring\u003e();\n                highlightFields.Add(\"title\");\n                queryHighlight.Fields = highlightFields;\n\n                SearchQuery query = new SearchQuery();\n                query.QueryString = \"@title Bag\";\n                \n                searchRequest.Query = query;\n                searchRequest.Highlight = queryHighlight;\n                \n                SearchResponse searchResponse = searchApi.Search(searchRequest);\n\t\t\t\t\t\t\n\t\t\t\tConsole.WriteLine(searchResponse);\n\t\t\t}\n            catch (ApiException  e)\n            {\n                Debug.Print(\"Exception when calling Api method: \" + e.Message);\n                Debug.Print(\"Status Code: \" + e.ErrorCode);\n                Debug.Print(e.StackTrace);\n            }\n            \n\n        }\n    }\n}\n```\n\n\u003ca id=\"documentation-for-api-endpoints\"\u003e\u003c/a\u003e\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* | [**PartialReplace**](docs/IndexApi.md#partialreplace) | **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\u003ca id=\"documentation-for-models\"\u003e\u003c/a\u003e\n## Documentation for Models\n\n - [Model.AggComposite](docs/AggComposite.md)\n - [Model.AggCompositeSource](docs/AggCompositeSource.md)\n - [Model.AggCompositeTerm](docs/AggCompositeTerm.md)\n - [Model.AggTerms](docs/AggTerms.md)\n - [Model.Aggregation](docs/Aggregation.md)\n - [Model.AutocompleteRequest](docs/AutocompleteRequest.md)\n - [Model.BoolFilter](docs/BoolFilter.md)\n - [Model.BulkResponse](docs/BulkResponse.md)\n - [Model.DeleteDocumentRequest](docs/DeleteDocumentRequest.md)\n - [Model.DeleteResponse](docs/DeleteResponse.md)\n - [Model.ErrorResponse](docs/ErrorResponse.md)\n - [Model.FulltextFilter](docs/FulltextFilter.md)\n - [Model.GeoDistance](docs/GeoDistance.md)\n - [Model.GeoDistanceLocationAnchor](docs/GeoDistanceLocationAnchor.md)\n - [Model.Highlight](docs/Highlight.md)\n - [Model.HighlightFieldOption](docs/HighlightFieldOption.md)\n - [Model.HitsHits](docs/HitsHits.md)\n - [Model.InsertDocumentRequest](docs/InsertDocumentRequest.md)\n - [Model.Join](docs/Join.md)\n - [Model.JoinCond](docs/JoinCond.md)\n - [Model.JoinOn](docs/JoinOn.md)\n - [Model.KnnQuery](docs/KnnQuery.md)\n - [Model.Match](docs/Match.md)\n - [Model.MatchAll](docs/MatchAll.md)\n - [Model.PercolateRequest](docs/PercolateRequest.md)\n - [Model.PercolateRequestQuery](docs/PercolateRequestQuery.md)\n - [Model.QueryFilter](docs/QueryFilter.md)\n - [Model.Range](docs/Range.md)\n - [Model.ReplaceDocumentRequest](docs/ReplaceDocumentRequest.md)\n - [Model.ResponseError](docs/ResponseError.md)\n - [Model.ResponseErrorDetails](docs/ResponseErrorDetails.md)\n - [Model.SearchQuery](docs/SearchQuery.md)\n - [Model.SearchRequest](docs/SearchRequest.md)\n - [Model.SearchResponse](docs/SearchResponse.md)\n - [Model.SearchResponseHits](docs/SearchResponseHits.md)\n - [Model.SourceRules](docs/SourceRules.md)\n - [Model.SqlObjResponse](docs/SqlObjResponse.md)\n - [Model.SqlResponse](docs/SqlResponse.md)\n - [Model.SuccessResponse](docs/SuccessResponse.md)\n - [Model.UpdateDocumentRequest](docs/UpdateDocumentRequest.md)\n - [Model.UpdateResponse](docs/UpdateResponse.md)\n\n\n\u003ca id=\"documentation-for-authorization\"\u003e\u003c/a\u003e\n## Documentation for Authorization\n\nEndpoints do not require authorization.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fmanticoresearch-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanticoresoftware%2Fmanticoresearch-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fmanticoresearch-net/lists"}