https://github.com/spotify/voyager
🛰️ An approximate nearest-neighbor search library for Python and Java with a focus on ease of use, simplicity, and deployability.
https://github.com/spotify/voyager
hnsw hnswlib java machine-learning nearest-neighbor-search python
Last synced: 4 days ago
JSON representation
🛰️ An approximate nearest-neighbor search library for Python and Java with a focus on ease of use, simplicity, and deployability.
- Host: GitHub
- URL: https://github.com/spotify/voyager
- Owner: spotify
- License: apache-2.0
- Created: 2023-04-13T13:07:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T00:26:36.000Z (21 days ago)
- Last Synced: 2025-04-05T09:01:55.338Z (11 days ago)
- Topics: hnsw, hnswlib, java, machine-learning, nearest-neighbor-search, python
- Language: C++
- Homepage: https://spotify.github.io/voyager/
- Size: 12 MB
- Stars: 1,414
- Watchers: 11
- Forks: 69
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-vector-database - Voyager
README

[](https://github.com/spotify/voyager/blob/master/LICENSE)
[](https://spotify.github.io/voyager)
[](https://pypi.org/project/voyager)
[](https://pypi.org/project/voyager)
[](https://github.com/spotify/voyager/actions/workflows/all.yml)**_Voyager_** is a library for performing fast approximate nearest-neighbor searches on an in-memory collection of vectors.
Voyager features bindings to both Python and Java, with feature parity and index compatibility between both languages. It uses the HNSW algorithm, based on [the open-source `hnswlib` package](https://github.com/nmslib/hnswlib), with numerous features added for convenience and speed. Voyager is used extensively in production at Spotify, and is queried hundreds of millions of times per day to power numerous user-facing features.
Think of Voyager like [Sparkey](https://github.com/spotify/sparkey), but for vector/embedding data; or like [Annoy](https://github.com/spotify/annoy), but with [much higher recall](http://ann-benchmarks.com/). It got its name because it searches through (embedding) space(s), much like [the Voyager interstellar probes](https://en.wikipedia.org/wiki/Voyager_program) launched by NASA in 1977.
[](https://spotify.github.io/voyager/python)
[](https://spotify.github.io/voyager/java)### Installation
#### Python
```shell
pip install voyager
```#### Java
Add the following artifact to your `pom.xml`:
```xmlcom.spotify
voyager
2.1.0```
You can find the latest version on [Voyager's Releases page](https://github.com/spotify/voyager/releases).#### Scala
Add the following artifact to your `build.sbt`:
```sbt
"com.spotify" % "voyager" % "2.1.0"
```
You can find the latest version on [Voyager's Releases page](https://github.com/spotify/voyager/releases).### Compatibility
| OS | Language | Version | x86_64 (Intel) | arm64 (ARM) |
|-----------|----------|---------|---------| --------|
| Linux | Python | 3.7 | ✅ | ✅ |
| Linux | Python | 3.8 | ✅ | ✅ |
| Linux | Python | 3.9 | ✅ | ✅ |
| Linux | Python | 3.10 | ✅ | ✅ |
| Linux | Python | 3.11 | ✅ | ✅ |
| Linux | Python | 3.12 | ✅ | ✅ |
| Linux | Python | 3.13 | ✅ | ✅ |
| Linux | Java | 8-16+ | ✅ | ✅ |
| macOS | Python | 3.7 | ✅ | ✅ |
| macOS | Python | 3.8 | ✅ | ✅ |
| macOS | Python | 3.9 | ✅ | ✅ |
| macOS | Python | 3.10 | ✅ | ✅ |
| macOS | Python | 3.11 | ✅ | ✅ |
| macOS | Python | 3.12 | ✅ | ✅ |
| macOS | Python | 3.13 | ✅ | ✅ |
| macOS | Java | 8-16+ | ✅ | ✅ |
| Windows | Python | 3.7 | ✅ | ❌ |
| Windows | Python | 3.8 | ✅ | ❌ |
| Windows | Python | 3.9 | ✅ | ❌ |
| Windows | Python | 3.10 | ✅ | ❌ |
| Windows | Python | 3.11 | ✅ | ❌ |
| Windows | Python | 3.12 | ✅ | ❌ |
| Windows | Python | 3.13 | ✅ | ❌ |
| Windows | Java | 8-16+ | ✅ | ❌ |## Contributing
Contributions to `voyager` are welcomed!
See [CONTRIBUTING.md](https://github.com/spotify/voyager/blob/master/CONTRIBUTING.md) for details.### License
Voyager is copyright 2022-2024 Spotify AB.Voyager is licensed under the [Apache 2 License]([https://www.gnu.org/licenses/gpl-3.0.en.html](https://www.apache.org/licenses/LICENSE-2.0)).