{"id":37094832,"url":"https://github.com/mecenat/solr","last_synced_at":"2026-03-01T16:05:28.026Z","repository":{"id":144214035,"uuid":"272726036","full_name":"mecenat/solr","owner":"mecenat","description":"A Solr client written in Go","archived":false,"fork":false,"pushed_at":"2025-09-29T11:51:40.000Z","size":97,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-14T13:56:24.556Z","etag":null,"topics":["core-api","go-solr","golang","schema-api","solr","solr-client","solr-core-api","solr-query","solr-schema-api","solr-search"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mecenat.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-16T14:12:31.000Z","updated_at":"2025-09-29T11:48:49.000Z","dependencies_parsed_at":"2024-01-31T13:51:11.441Z","dependency_job_id":"46e015ef-92a4-4578-a25f-6af4c5b46c00","html_url":"https://github.com/mecenat/solr","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/mecenat/solr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecenat%2Fsolr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecenat%2Fsolr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecenat%2Fsolr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecenat%2Fsolr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mecenat","download_url":"https://codeload.github.com/mecenat/solr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mecenat%2Fsolr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29974344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T15:41:30.362Z","status":"ssl_error","status_checked_at":"2026-03-01T15:37:07.343Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["core-api","go-solr","golang","schema-api","solr","solr-client","solr-core-api","solr-query","solr-schema-api","solr-search"],"created_at":"2026-01-14T11:40:27.826Z","updated_at":"2026-03-01T16:05:28.020Z","avatar_url":"https://github.com/mecenat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# solr\nA Solr client written in Go\n\nDesigned for Solr 8.5 (Should support earlier versions as well)\n\nProvides clients for Solr's Request API, Schema API \u0026 Core Admin API \n\nCurrently supports only JSON and basic CRUDL actions.\n\n\n## Installation\n```\ngo get -u github.com/mecenat/solr\n```\n\n## Usage\n\nTo create a new solr Client you need first to create a Connection. To create a Connection you need the host location (e.g. http://localhost:8983), the core name, and a http client. Use `solr.NewDefaultHTTPClient()` for a client with sensible connection pooling defaults. Sending your own client could be useful when you need to wrap the client with another service, for example if you want to use AWS's X-Ray service to trace your API's calls or granular control over connection limits.\n\nWhen using a single server:\n```\npackage main\n\nimport \"github.com/mecenat/solr\"\n\nfunc main() {\n\tconn, err := solr.NewConnection(\"host\", \"core\", solr.NewDefaultHTTPClient())\n\tif err != nil {\n\t\t\t\t...\n\t}\n\tslr, err := solr.NewSingleClient(conn)\n\tif err != nil {\n\t      ...\n\t}\n```\nWhen using a the Primary-Replica paradigm:\n```\npackage main\n\nimport \"github.com/mecenat/solr\"\n\nfunc main() {\n\tprimaryConn, err := solr.NewConnection(\"primaryHost\", \"core\", solr.NewDefaultHTTPClient())\n\tif err != nil {\n\t\t\t\t...\n\t}\n\treplicaConn, err := solr.NewConnection(\"replicaHost\", \"core\", solr.NewDefaultHTTPClient())\n\tif err != nil {\n\t\t\t\t...\n\t}\n\tslr, err := solr.NewPrimaryReplicaClient(primaryConn, replicaConn)\n\tif err != nil {\n\t      ...\n\t}\n```\n\nAside from the normal Connection you can you a RetryableConnection which implements [Hashicorp's retryable HttpClient](https://github.com/hashicorp/go-retryablehttp) specifying the max timeout and provide that connection to the clients.\n```\npackage main\n\nimport \"github.com/mecenat/solr\"\n\nfunc main() {\n\tretConn, err := solr.NewRetryableConnection(\"host\", \"core\", solr.NewDefaultHTTPClient(), 500*time.Millisecond)\n\tif err != nil {\n\t\t\t\t...\n\t}\n\tslr, err := solr.NewSingleClient(retConn)\n\tif err != nil {\n\t      ...\n\t}\n```\n\nTo access Solr's Core Admin API you need to create a separate client as follows:\n```\npackage main\n\nimport \"github.com/mecenat/solr\"\n\nfunc main() {\n\tctx := context.Background()\n\tca, err := solr.NewCoreAdmin(ctx, \"host\", solr.NewDefaultHTTPClient())\n\tif err != nil {\n\t\t\t\t...\n\t}\n```\n\nTo access Solr's Schema API you also need a separate client as follows:\n```\npackage main\n\nimport \"github.com/mecenat/solr\"\n\nfunc main() {\n\tctx := context.Background()\n\tsa, err := solr.NewSchemaAPI(ctx, \"host\", \"core\", solr.NewDefaultHTTPClient())\n\tif err != nil {\n\t\t\t\t...\n\t}\n```\n\n## Releasing\n\nTo create a new release, push a semver tag to `master`:\n\n```\ngit tag v1.5.0\ngit push origin v1.5.0\n```\n\nThis triggers a GitHub Actions workflow that runs tests and creates a GitHub release with auto-generated notes.\n\n## License\n\nThis library is licensed under the MIT license. It depends on github.com/hashicorp/go-cleanhttp and github.com/hashicorp/go-retryablehttp, which is licensed under the Mozilla Public License (MPL).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmecenat%2Fsolr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmecenat%2Fsolr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmecenat%2Fsolr/lists"}