mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-25 22:29:58 +00:00
Solves #216 by adding a check on table open for existence of the `.lance` file. Does not check for it for remote connections.
LanceDB
A JavaScript / Node.js library for LanceDB.
Installation
npm install vectordb
Usage
Basic Example
const lancedb = require('vectordb');
const db = lancedb.connect('<PATH_TO_LANCEDB_DATASET>');
const table = await db.openTable('my_table');
const results = await table.search([0.1, 0.3]).limit(20).execute();
console.log(results);
The examples folder contains complete examples.
Development
Run the tests with
npm test
To run the linter and have it automatically fix all errors
npm run lint -- --fix
To build documentation
npx typedoc --plugin typedoc-plugin-markdown --out ../docs/src/javascript src/index.ts