{"id":30793995,"url":"https://github.com/sendgrid/go-solr","last_synced_at":"2025-09-05T16:26:29.942Z","repository":{"id":57492705,"uuid":"87462048","full_name":"sendgrid/go-solr","owner":"sendgrid","description":"solr go client from sendgrid, zookeeper aware, incorporates retries","archived":false,"fork":false,"pushed_at":"2019-04-26T15:02:10.000Z","size":3652,"stargazers_count":39,"open_issues_count":5,"forks_count":26,"subscribers_count":129,"default_branch":"master","last_synced_at":"2025-08-14T12:52:01.475Z","etag":null,"topics":["golang","golang-library","mc","solrcloud","zookeeper"],"latest_commit_sha":null,"homepage":"","language":"Go","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/sendgrid.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}},"created_at":"2017-04-06T18:32:06.000Z","updated_at":"2023-06-10T18:55:07.000Z","dependencies_parsed_at":"2022-08-28T13:41:36.392Z","dependency_job_id":null,"html_url":"https://github.com/sendgrid/go-solr","commit_stats":null,"previous_names":["sendgrid/gosolr","sendgrid/solr-go"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/sendgrid/go-solr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fgo-solr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fgo-solr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fgo-solr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fgo-solr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sendgrid","download_url":"https://codeload.github.com/sendgrid/go-solr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fgo-solr/sbom","scorecard":{"id":811041,"data":{"date":"2025-08-11","repo":{"name":"github.com/sendgrid/go-solr","commit":"1adfda84fa9c7c02fb85f7a10b9d564e99352ee4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: cmd/SolrJLoadTest.class:1","Warn: binary detected: cmd/solr-solrj-6.4.2.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating golang:1.8.1 to golang:1.8.1@sha256:fbc08ed49ead169a4e921192f739af69cb45871af3a51f1334e477482816e34e","Warn: goCommand not pinned by hash: Dockerfile:3","Warn: goCommand not pinned by hash: Dockerfile:4","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   2 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T13:11:13.123Z","repository_id":57492705,"created_at":"2025-08-23T13:11:13.123Z","updated_at":"2025-08-23T13:11:13.123Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273782729,"owners_count":25167204,"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-09-05T02:00:09.113Z","response_time":402,"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":["golang","golang-library","mc","solrcloud","zookeeper"],"created_at":"2025-09-05T16:26:26.237Z","updated_at":"2025-09-05T16:26:29.931Z","avatar_url":"https://github.com/sendgrid.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SendGrid Logo](https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png)\n\n[![travis](https://travis-ci.org/sendgrid/go-solr.svg?branch=master)](https://travis-ci.org/sendgrid/go-solr)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sendgrid/go-solr)](https://goreportcard.com/report/github.com/sendgrid/go-solr)\n[![GoDoc](https://godoc.org/github.com/sendgrid/go-solr?status.svg)](https://godoc.org/github.com/sendgrid/go-solr)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![CLA assistant](https://cla.sendgrid.com/readme/badge/sendgrid/go-solr)](https://cla.sendgrid.com/sendgrid/go-solr)\n[![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/docs.svg)](https://github.com/sendgrid/go-solr/graphs/contributors)\n\n# go-solr\nsolr go client from Sendgrid\n\n## Usage\nTo start the client\n```\nsolrzk := solr.NewSolrZK(...)\nsolrzk.Listen()\nsolrhttp := solr.NewSolrHttp(solrzk)\nsolrClient := solr.NewSolrHttpRetrier(solrhttp)\n```\nThe Read and Update methods take a node list use the SolrLocator interface to return a node list\n\n```\nlocator := solr.GetSolrLocator(solr.NewSolrZK(...))\ntype SolrLocator interface {\n\tGetLeaders(docID string) ([]string, error)\n\tGetReplicaUris() ([]string, error)\n\tGetReplicasFromRoute(route string) ([]string, error)\n\tGetLeadersAndReplicas(docID string) ([]string, error)\n}\n```\n\n\nTo make requests\n```\nsolrClient.Select(locator.GetReplicasFromRoute(\"shard!\"),solr.FilterQuery(\"myfield:test\"),solr.Route(\"shardkey!\"))\n```\nTo make updates\n```\nsolrClient.Update(locator.GetLeadersAndReplicas(\"{anydocidtoroute}\"),collectionName,callsSolrJsonDocs, docsMap)\n```\n\n## Tests on solr\n1. ```docker-compose up ```\n2. ```docker-compose run gotests bash ```\n3. ```go test ```\n4. ```go run ./cmd/solrRunner.go 1000 ```\n\n## Tests with cluster of 3 solrs\n1. ```docker-compose -p cluster -f docker-compose.cluster.yml up ```\n2. ```docker-compose -p cluster run gotests bash ```\n3. ```go test ```\n4. ```go run ./cmd/solrRunner.go 1000 ```\n\n\n\n## License\n[The MIT License (MIT)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendgrid%2Fgo-solr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsendgrid%2Fgo-solr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendgrid%2Fgo-solr/lists"}