Small-scale semantic search that ditches cgo for pure Go
It gives Go developers a cgo-free way to add BERT embeddings and brute-force vector search to small-scale apps.

What it does
kelindar/search generates semantic embeddings with GGUF BERT models through llama.cpp and performs brute-force vector similarity search, all from Go. It is built for small to medium datasets—fewer than 100,000 entries—where the overhead of a full vector database is overkill. The library handles model loading, embedding computation, and index persistence, letting you save and reload vectors across restarts.
The interesting bit
Rather than wrestling with cgo, the library uses purego to call shared C libraries directly, which neatly sidesteps cross-compilation and deployment headaches. It also ships with precompiled binaries that include optional Vulkan GPU acceleration for Windows and Linux, so you can get GPU speed without building from source.
Key highlights
- Binds to llama.cpp without cgo by calling shared libraries directly via
purego. - Supports GGUF-format BERT models for embedding generation.
- Uses brute-force search with SIMD optimizations; no approximate-nearest-neighbor indexes required.
- Includes precompiled Vulkan-enabled binaries for Windows and Linux, plus CPU-only builds.
- Embeddings indexes can be saved to disk and reloaded later.
Caveats
- Datasets beyond ~100,000 entries will hit a wall because the search is strictly brute-force.
- No support for multi-field filtering, fuzzy matching, or SQL-like query operations.
- High-dimensional LLM embeddings can tax the system unless GPU resources are available.
Verdict
A solid fit for Go services that need semantic search without operating a separate vector database or touching cgo. Look elsewhere if you are indexing at scale or need complex, filtered queries.
Frequently asked
- What is kelindar/search?
- It gives Go developers a cgo-free way to add BERT embeddings and brute-force vector search to small-scale apps.
- Is search open source?
- Yes — kelindar/search is open source, released under the MIT license.
- What language is search written in?
- kelindar/search is primarily written in Go.
- How popular is search?
- kelindar/search has 554 stars on GitHub.
- Where can I find search?
- kelindar/search is on GitHub at https://github.com/kelindar/search.