{"id":37154351,"url":"https://github.com/specializedgeneralist/hnsw-grpc-server","last_synced_at":"2026-01-14T18:12:27.075Z","repository":{"id":57574987,"uuid":"354654671","full_name":"SpecializedGeneralist/hnsw-grpc-server","owner":"SpecializedGeneralist","description":"gRPC server for hnswlib","archived":true,"fork":false,"pushed_at":"2023-03-06T23:53:14.000Z","size":222,"stargazers_count":14,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-21T20:08:43.731Z","etag":null,"topics":["hnsw","hnswlib","vector-search-engine","vector-similarity-database"],"latest_commit_sha":null,"homepage":"","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/SpecializedGeneralist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-04-04T21:58:38.000Z","updated_at":"2024-02-29T04:55:59.000Z","dependencies_parsed_at":"2024-06-20T18:52:58.517Z","dependency_job_id":"da29d2fa-a418-4a91-9578-5a5236734df4","html_url":"https://github.com/SpecializedGeneralist/hnsw-grpc-server","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/SpecializedGeneralist/hnsw-grpc-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpecializedGeneralist%2Fhnsw-grpc-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpecializedGeneralist%2Fhnsw-grpc-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpecializedGeneralist%2Fhnsw-grpc-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpecializedGeneralist%2Fhnsw-grpc-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpecializedGeneralist","download_url":"https://codeload.github.com/SpecializedGeneralist/hnsw-grpc-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpecializedGeneralist%2Fhnsw-grpc-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28429953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"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":["hnsw","hnswlib","vector-search-engine","vector-similarity-database"],"created_at":"2026-01-14T18:12:26.444Z","updated_at":"2026-01-14T18:12:27.069Z","avatar_url":"https://github.com/SpecializedGeneralist.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hnsw-grpc-server\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/SpecializedGeneralist/hnsw-grpc-server)](https://goreportcard.com/report/github.com/SpecializedGeneralist/hnsw-grpc-server)\n[![Maintainability](https://api.codeclimate.com/v1/badges/7b5c7fd17aada5ad4016/maintainability)](https://codeclimate.com/github/SpecializedGeneralist/hnsw-grpc-server/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/7b5c7fd17aada5ad4016/test_coverage)](https://codeclimate.com/github/SpecializedGeneralist/hnsw-grpc-server/test_coverage)\n\nThis is a gRPC server for [hnswlib](https://github.com/nmslib/hnswlib).\n\nIt provides more than just the core HNSW model: it is a tool that can be used\nend-to-end, supporting TLS encryption, multiple persistent indices and batch\ninsertions.\n\nThis repository includes the relevant sources from the [hnswlib](https://github.com/nmslib/hnswlib),\nso it doesn't require any external dependency. For more information please\nrefer to [hnswlib](https://github.com/nmslib/hnswlib) and\n[Efficient and robust approximate nearest neighbor search using Hierarchical\nNavigable Small World graphs](https://arxiv.org/abs/1603.09320).\n\n## Features\n\nA list of API methods now follows:\n\n| Method | Description |\n| -------------- | --------- |\n| CreateIndex | Make a new index |\n| DeleteIndex | Removes an index |\n| InsertVector | Insert a new vector in the given index, letting the index generate an ID |\n| InsertVectors | Insert new vectors in the given index, with generated ID, then flush the index |\n| InsertVectorWithId | Insert a new vector with given ID in the given index |\n| InsertVectorsWithId | Insert new vectors with given IDs in the given index, then flush the index |\n| SearchKNN | Return the top k nearest neighbors to the query, searching on the given index |\n| FlushIndex | Serialize the index to file |\n| Indices | Return the list of indices |\n| SetEf | Set the `ef` parameter for the given index |\n\n## Build and run\n\nYou first need to compile the C++ `hnswlib` wrapper. Just run the following\nscript to compile it with `g++`:\n\n```shell\n./pkg/hnswgo/make.sh\n```\n\nThen, download Go dependencies and build the package (with `cgo` enabled):\n\n```shell\ngo mod download\nCGO_CXXFLAGS=\"-std=c++11\" CGO_ENABLED=1 go build \\\n  -ldflags=\"-extldflags=-static\" \\\n  -o hnsw-grpc-server \\\n  cmd/main.go\n```\n\nYou can finally run the executable. For example, you can get help running:\n\n```shell\n./hnsw-grpc-server -h\n```\n\n## Docker\n\nThe [Docker](https://www.docker.com/) image can be built like this:\n\n```console\ndocker build -t hnsw-grpc-server:latest .\n```\n\nPre-built images are available on Docker Hub, at [specializedgeneralist/hnsw-grpc-server](https://hub.docker.com/r/specializedgeneralist/hnsw-grpc-server).\n\nFor example, you can pull the image and run the server like this:\n\n```shell\ndocker run -d \\\n    --name hnsw-grpc-server \\\n    -v /path/to/your/data/folder:/hnsw-grpc-server-data\n    -p 19530:19530 \\\n    specializedgeneralist/hnsw-grpc-server:1.0.0\n```\n\n## Credits\n\n- [hnswlib](https://github.com/nmslib/hnswlib) - Header-only C++ HNSW implementation.\n- [hnswgo](https://github.com/evan176/hnswgo) - Go interface for hnswlib.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecializedgeneralist%2Fhnsw-grpc-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspecializedgeneralist%2Fhnsw-grpc-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecializedgeneralist%2Fhnsw-grpc-server/lists"}