{"id":20528229,"url":"https://github.com/manticoresoftware/go-sdk","last_synced_at":"2025-04-14T04:51:36.627Z","repository":{"id":54565157,"uuid":"184379397","full_name":"manticoresoftware/go-sdk","owner":"manticoresoftware","description":"Go client for Manticore Search","archived":false,"fork":false,"pushed_at":"2024-02-10T15:56:37.000Z","size":70,"stargazers_count":53,"open_issues_count":13,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T18:52:26.469Z","etag":null,"topics":["golang","manticoresearch","sdk","sdk-go","sphinxsearch"],"latest_commit_sha":null,"homepage":"https://manticoresearch.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","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","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}},"created_at":"2019-05-01T06:48:20.000Z","updated_at":"2024-11-20T16:45:31.000Z","dependencies_parsed_at":"2024-06-19T04:10:23.069Z","dependency_job_id":"959d6b1d-c8a8-4dd9-89dd-7721318a9cff","html_url":"https://github.com/manticoresoftware/go-sdk","commit_stats":null,"previous_names":["manticoresoftware/go-manticore"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fgo-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fgo-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fgo-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manticoresoftware%2Fgo-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manticoresoftware","download_url":"https://codeload.github.com/manticoresoftware/go-sdk/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":["golang","manticoresearch","sdk","sdk-go","sphinxsearch"],"created_at":"2024-11-15T23:24:05.716Z","updated_at":"2025-04-14T04:51:36.609Z","avatar_url":"https://github.com/manticoresoftware.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Binary-API based Go SDK for [Manticore Search](https://www.manticoresearch.com).\n\n❗❗❗ WARNING ❗❗❗\n\nFebruary 10th 2024:\n\n**🚀We've released the new Manticore Go Client - https://github.com/manticoresoftware/manticoresearch-go . 🔃The SDK in this repository will no longer receive support. We recommend users switch to the new client for future updates and support.**\n\n🔧Why the change? This Go SDK was hard to maintain due to its manual creation process and reliance on the Manticore binary protocol. While this method did offer insignificant speed benefits, it also made updates and maintenance more cumbersome. The new Go client marks a significant leap forward. By adopting auto-generation from the [OpenAPI specifications](https://manual.manticoresearch.com/Openapi#OpenAPI-specification), we ensure easier updates, consistent cross-SDK compatibility, and a stronger support moving forward. Transitioning away from a binary protocol may insignificantly impact performance, but the advantages of maintainability, simplified upgrades, and standard API practices significantly outweigh the drawbacks.\n\n📣We urge all users to migrate to the new Go client. Designed for durability, ease of use, and seamless integration with Manticore's search capabilities, it's the future-proof choice. For migration support, visit our docs or contact us.\n\n## Compatibility\nThe client is compatible with Manticore Search 2.8.2 and higher for majority of the commands.\nIt also may be used in many cases to access SphinxSearch daemon as well. However it's not guaranteed.\n\n## Requirements\nGo version 1.9 or higher\n\n## Installation\n```\ngo get github.com/manticoresoftware/go-sdk/manticore\n```\n\n## Usage\nHere's a short example on how the client can be used:\nMake sure there's some running Manticore instance, you can use our [docker image](https://hub.docker.com/r/manticoresearch/manticore) for a quick test:\n```\ndocker run --name manticore -p 9313:9312 -p9306:9306 -d manticoresearch/manticore\n```\n\nHere's just a simplest script:\n```\n[root@srv ~]# cat manticore.go\npackage main\n\nimport \"github.com/manticoresoftware/go-sdk/manticore\"\nimport \"fmt\"\n\nfunc main() {\n\tcl := manticore.NewClient()\n\tcl.SetServer(\"127.0.0.1\", 9313)\n\tcl.Open()\n\tres, err := cl.Sphinxql(`replace into testrt values(1,'my subject', 'my content', 15)`)\n\tfmt.Println(res, err)\n\tres, err = cl.Sphinxql(`replace into testrt values(2,'another subject', 'more content', 15)`)\n\tfmt.Println(res, err)\n\tres, err = cl.Sphinxql(`replace into testrt values(5,'again subject', 'one more content', 10)`)\n\tfmt.Println(res, err)\n\tres2, err2 := cl.Query(\"more|another\", \"testrt\")\n\tfmt.Println(res2, err2)\n}\n```\n\nAnd here's how it works:\n```\n[root@srv ~]# go run manticore.go\n[Query OK, 1 rows affected] \u003cnil\u003e\n[Query OK, 1 rows affected] \u003cnil\u003e\n[Query OK, 1 rows affected] \u003cnil\u003e\nStatus: ok\nQuery time: 0s\nTotal: 1\nTotal found: 1\nSchema:\n\tFields:\n\t\ttitle\n\t\tcontent\n\tAttributes:\n\t\tgid: int\nMatches:\n\tDoc: 2, Weight: 2, attrs: [15]\nWord stats:\n\t'more' (Docs:2, Hits:2)\n\t'another' (Docs:1, Hits:1)\n \u003cnil\u003e\n```\n\nRead [full documentation on godoc](https://godoc.org/github.com/manticoresoftware/go-sdk/manticore) to learn more about available functions and find more examples. You can also read it from the console as `go doc go-sdk/manticore`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fgo-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanticoresoftware%2Fgo-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanticoresoftware%2Fgo-sdk/lists"}