Vectorlite v0.2.0 is a fast and tunable vector search extension for SQLite, enabling approximate nearest neighbor (ANN) search within SQLite databases. It provides virtual table syntax for creating vector indexes (e.g., with HNSW) and supports storing vectors as JSON or raw float32 buffers. Key differentiators include high performance, tunable parameters, and simple integration with node.js via better-sqlite3 or other SQLite bindings. The release cadence is currently unknown; check GitHub for updates.
npm install vectorliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an in-memory SQLite database with a vector virtual table using better-sqlite3, inserts two vectors, and performs a k-nearest neighbor search for the top 2 results.
Use JSON.stringify() to serialize arrays before passing to vector_from_json.
Use Buffer.from(Float32Array.from(array).buffer) to create the correct buffer.
Do not parse the output of vectorlite_info() programmatically; use only for debugging.
Ensure the first argument to knn_search is the query vector buffer, and knn_param is the second argument.
Plan vector capacity ahead when defining the virtual table.
Call db.loadExtension(vectorlitePath()) before executing any vectorlite SQL commands.
Use named import: import { vectorlitePath } from 'vectorlite'.Ensure db.loadExtension(vectorlitePath()) is called first.
No dependency data recorded yet.