Skip to content

Java library for approximate nearest neighbors search using Hierarchical Navigable Small World graphs

License

Notifications You must be signed in to change notification settings

jelmerk/hnswlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Jelmer Kuperus
Mar 7, 2025
8865dd5 · Mar 7, 2025
Jan 2, 2025
Mar 6, 2025
Mar 6, 2025
Mar 7, 2025
Mar 6, 2025
Jan 3, 2024
Mar 6, 2025
Jan 3, 2024
Mar 6, 2025
Dec 30, 2023
Dec 30, 2023
Dec 30, 2023
Dec 30, 2023
Mar 6, 2025
Oct 29, 2020
Dec 30, 2023
Jan 1, 2024

Repository files navigation

Build Status

Hnswlib

Java implementation of the the Hierarchical Navigable Small World graphs (HNSW) algorithm for doing approximate nearest neighbour search.

The index is thread safe, serializable, supports adding items to the index incrementally and has experimental support for deletes.

It's flexible interface makes it easy to apply it to use it with any type of data and distance metric.

The following distance metrics are currently pre-packaged :

  • bray curtis dissimilarity
  • canberra distance
  • correlation distance
  • cosine distance
  • euclidean distance
  • inner product
  • manhattan distance

It comes with a scala wrapper that should feel native to scala developers

Apache spark support was moved into the hnswlib-spark project.

To find out more about how to use this library take a look at the hnswlib-examples module or browse the documentation in the readme files of the submodules

Sponsors

YourKIT logo

YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.