mirror of
https://github.com/lancedb/lancedb.git
synced 2026-08-18 12:08:35 +00:00
fc725c99f0
Support `createTable(name, data, mode?)` to be consistent with Python. Closes #242
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