USearch

Fast Open-Source Search & Clustering engine × for Vectors & Arbitrary Objects × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and W

What is USearch?

Fast Open-Source Search & Clustering engine × for Vectors & Arbitrary Objects × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍

Overview of USearch

What it is

USearch is a fast open-source search and clustering engine for vectors and arbitrary objects. It is implemented as a single C++11 header library and provides bindings for C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, Go, and Wolfram. It uses the HNSW (Hierarchical Navigable Small World) algorithm for approximate nearest neighbor search.

Key features

  • 10x faster HNSW implementation than FAISS (as stated in the README).
  • Simple and extensible single C++11 header library.
  • Trusted by Google and databases like ClickHouse and DuckDB.
  • SIMD-optimized and user-defined metrics with JIT compilation.
  • Hardware-agnostic support for bf16, e5m2, and i8 half-precision and quarter-precision types.
  • Ability to view large indexes from disk without loading into RAM.
  • Heterogeneous lookups, renaming/relabeling, and on-the-fly deletions.

Use cases

  • Semantic search and joins.
  • Near-real-time clustering and sub-clustering for tens or millions of clusters.
  • Genomics and chemistry applications using binary Tanimoto and Sorensen coefficients.
  • GIS and custom metrics for composite embeddings from multiple AI models.
  • Hybrid full-text and semantic search.

Getting started

Install the Python package:pip install usearchExample usage in Python:pythonimport numpy as npfrom usearch.index import Indexindex = Index(ndim=3)vector = np.array([0.2, 0.6, 0.4])index.add(42, vector)matches = index.search(vector, 10)assert matches[0].key == 42assert matches[0].distance < 0.001For C++:cpp#include using namespace unum::usearch;auto index = index_32_t::make(3);index.add(42, {0.2, 0.6, 0.4});auto results = index.search({0.2, 0.6, 0.4}, 10);For other languages, see the repository README.

License and pricing

Licensed under Apache-2.0. Open source (no pricing stated).

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/unum-cloudusearch.svg)](https://yunodb.com/tools/unum-cloudusearch?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/unum-cloudusearch?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/unum-cloudusearch.svg" alt="Featured on YunoDB" height="20"></a>