Practical overview
When it fits
Use it when a Clojure application needs to index existing vector representations and query nearest matches, with file-based index persistence.
Who it is for
- Clojure developers adding vector indexing and nearest-neighbor search to applications.
- Teams prototyping semantic document or image retrieval with vectors.
Documented uses
- Create a keyed vector index from application data.
- Search an index for the closest vector or a requested number of matches.
- Retrieve a stored vector by key.
- Save an index to disk and load it again.
Requirements & limits
- The README lists native dependencies for Linux x86-64 and macOS x86-64 and ARM64.
- The index example configures vector dimensions and f32 quantization, so input vectors must fit the chosen index configuration.
- The library is not thread-safe and may crash the JVM if used concurrently from multiple threads.
- The repository is licensed under Apache License 2.0.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Create, query, and persist a vector index
Use the documented Clojure API to populate an index, retrieve nearest matches, and save and reload it.
Before you start
- A Clojure project with the usearch-clj dependency.
- The matching native dependency for Linux x86-64, macOS x86-64, or macOS ARM64.
- Vectors represented as float arrays with a consistent configured dimension.
Steps
Initialize an index with its vector dimensions and quantization setting, optionally supplying keyed vectors.
Add further vectors with keys; reserve additional capacity before adding when needed.
Call search with a query vector to retrieve its closest match or request multiple matches.
Save the index to a file, then initialize a matching index and load the saved file.
Expected outcome
A populated vector index that can return nearest-match results and be saved for later loading.
Guide limitations
- The library is not thread-safe; concurrent use from multiple threads may crash the JVM.
- The README lists native dependency artifacts for Linux x86-64 and macOS x86-64 and ARM64.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- phronmophobic/usearch.clj · Official homepage title · retained in its source language

