Compare commits

...

4 Commits

Author SHA1 Message Date
qzhu
1023a5754b separate local and cloud connect 2024-01-31 11:33:02 -08:00
qzhu
7808f28ec7 exclude storage.js for tests 2024-01-25 17:08:27 -08:00
qzhu
157fb9ea72 fix lint 2024-01-25 16:29:06 -08:00
qzhu
7a5e65d437 website api doc rework 2024-01-25 16:16:50 -08:00
34 changed files with 1048 additions and 196 deletions

View File

@@ -61,6 +61,7 @@ jobs:
working-directory: node
run: |
npx typedoc --plugin typedoc-plugin-markdown --out ../docs/src/javascript src/index.ts
cp ../docs/src/javascript.md ../docs/src/javascript/javascript.md
- name: Build docs
run: |
PYTHONPATH=. mkdocs build -f docs/mkdocs.yml
@@ -72,4 +73,4 @@ jobs:
path: "docs/site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1

View File

@@ -129,12 +129,9 @@ nav:
- 💭 FAQs: faq.md
- ⚙️ API reference:
- 🐍 Python: python/python.md
- 👾 JavaScript: javascript/modules.md
- 👾 JavaScript: javascript/javascript.md
- ☁️ LanceDB Cloud:
- Overview: cloud/index.md
- API reference:
- 🐍 Python: python/saas-python.md
- 👾 JavaScript: javascript/saas-modules.md
- Quick start: basic.md
@@ -184,12 +181,9 @@ nav:
- TransformersJS Embedding Search: examples/transformerjs_embedding_search_nodejs.md
- API reference:
- Python: python/python.md
- Javascript: javascript/modules.md
- Javascript: javascript/javascript.md
- LanceDB Cloud:
- Overview: cloud/index.md
- API reference:
- 🐍 Python: python/saas-python.md
- 👾 JavaScript: javascript/saas-modules.md
extra_css:
- styles/global.css

62
docs/src/javascript.md Normal file
View File

@@ -0,0 +1,62 @@
# Javascript API Reference
This section contains the API reference for LanceDB Javascript API.
## Installation
```bash
npm install vectordb
```
This will download the appropriate native library for your platform. We currently
support:
* Linux (x86_64 and aarch64)
* MacOS (Intel and ARM/M1/M2)
* Windows (x86_64 only)
We do not yet support musl-based Linux (such as Alpine Linux) or arch64 Windows.
## Usage
### Basic Example
Connect to a local directory
```javascript
const lancedb = require('vectordb');
//connect to a local database
const db = await lancedb.connect('data/sample-lancedb');
```
Connect to LancdDB cloud
```javascript
connect to LanceDB Cloud
const db = await lancedb.connect({
uri: "db://my-database",
apiKey: "sk_...",
region: "us-east-1"
});
```
Create a table followed by a search
```javascript
const table = await db.createTable("my_table",
[{ id: 1, vector: [0.1, 1.0], item: "foo", price: 10.0 },
{ id: 2, vector: [3.9, 0.5], item: "bar", price: 20.0 }])
const results = await table.search([0.1, 0.3]).limit(20).execute();
console.log(results);
```
The [examples](./examples) folder contains complete examples.
## Table of contents
### Connection
Connect to a LanceDB database.
- [Connection](interfaces/Connection.md)
### Table
A Table is a collection of Records in a LanceDB Database.
- [Table](interfaces/Table.md)
### Query
The LanceDB Query
- [Query](classes/Query.md)

View File

@@ -38,4 +38,4 @@ A [WriteMode](../enums/WriteMode.md) to use on this operation
#### Defined in
[index.ts:1019](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1019)
[index.ts:1070](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1070)

View File

@@ -46,7 +46,7 @@ A connection to a LanceDB database.
#### Defined in
[index.ts:489](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L489)
[index.ts:496](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L496)
## Properties
@@ -56,7 +56,7 @@ A connection to a LanceDB database.
#### Defined in
[index.ts:487](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L487)
[index.ts:494](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L494)
___
@@ -74,7 +74,7 @@ ___
#### Defined in
[index.ts:486](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L486)
[index.ts:493](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L493)
## Accessors
@@ -92,7 +92,7 @@ ___
#### Defined in
[index.ts:494](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L494)
[index.ts:501](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L501)
## Methods
@@ -113,7 +113,7 @@ Creates a new Table, optionally initializing it with new data.
| Name | Type |
| :------ | :------ |
| `name` | `string` \| [`CreateTableOptions`](../interfaces/CreateTableOptions.md)\<`T`\> |
| `data?` | `Record`\<`string`, `unknown`\>[] |
| `data?` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] |
| `optsOrEmbedding?` | [`WriteOptions`](../interfaces/WriteOptions.md) \| [`EmbeddingFunction`](../interfaces/EmbeddingFunction.md)\<`T`\> |
| `opt?` | [`WriteOptions`](../interfaces/WriteOptions.md) |
@@ -127,7 +127,7 @@ Creates a new Table, optionally initializing it with new data.
#### Defined in
[index.ts:542](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L542)
[index.ts:549](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L549)
___
@@ -158,7 +158,7 @@ ___
#### Defined in
[index.ts:576](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L576)
[index.ts:583](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L583)
___
@@ -184,7 +184,7 @@ Drop an existing table.
#### Defined in
[index.ts:630](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L630)
[index.ts:637](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L637)
___
@@ -210,7 +210,7 @@ Open a table in the database.
#### Defined in
[index.ts:510](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L510)
[index.ts:517](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L517)
**openTable**\<`T`\>(`name`, `embeddings`): `Promise`\<[`Table`](../interfaces/Table.md)\<`T`\>\>
@@ -239,7 +239,7 @@ Connection.openTable
#### Defined in
[index.ts:518](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L518)
[index.ts:525](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L525)
**openTable**\<`T`\>(`name`, `embeddings?`): `Promise`\<[`Table`](../interfaces/Table.md)\<`T`\>\>
@@ -266,7 +266,7 @@ Connection.openTable
#### Defined in
[index.ts:522](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L522)
[index.ts:529](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L529)
___
@@ -286,4 +286,4 @@ Get the names of all tables in the database.
#### Defined in
[index.ts:501](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L501)
[index.ts:508](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L508)

View File

@@ -74,7 +74,7 @@ A LanceDB Table is the collection of Records. Each Record has one or more vector
#### Defined in
[index.ts:642](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L642)
[index.ts:649](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L649)
**new LocalTable**\<`T`\>(`tbl`, `name`, `options`, `embeddings`)
@@ -95,7 +95,7 @@ A LanceDB Table is the collection of Records. Each Record has one or more vector
#### Defined in
[index.ts:649](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L649)
[index.ts:656](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L656)
## Properties
@@ -105,7 +105,7 @@ A LanceDB Table is the collection of Records. Each Record has one or more vector
#### Defined in
[index.ts:639](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L639)
[index.ts:646](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L646)
___
@@ -115,7 +115,7 @@ ___
#### Defined in
[index.ts:638](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L638)
[index.ts:645](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L645)
___
@@ -125,7 +125,7 @@ ___
#### Defined in
[index.ts:637](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L637)
[index.ts:644](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L644)
___
@@ -143,7 +143,7 @@ ___
#### Defined in
[index.ts:640](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L640)
[index.ts:647](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L647)
___
@@ -153,7 +153,7 @@ ___
#### Defined in
[index.ts:636](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L636)
[index.ts:643](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L643)
___
@@ -179,7 +179,7 @@ Creates a filter query to find all rows matching the specified criteria
#### Defined in
[index.ts:688](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L688)
[index.ts:695](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L695)
## Accessors
@@ -197,7 +197,7 @@ Creates a filter query to find all rows matching the specified criteria
#### Defined in
[index.ts:668](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L668)
[index.ts:675](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L675)
___
@@ -215,7 +215,7 @@ ___
#### Defined in
[index.ts:849](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L849)
[index.ts:875](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L875)
## Methods
@@ -229,7 +229,7 @@ Insert records into this Table.
| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
#### Returns
@@ -243,7 +243,7 @@ The number of rows added to the table
#### Defined in
[index.ts:696](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L696)
[index.ts:703](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L703)
___
@@ -257,7 +257,7 @@ ___
#### Defined in
[index.ts:861](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L861)
[index.ts:887](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L887)
___
@@ -267,6 +267,8 @@ ___
Clean up old versions of the table, freeing disk space.
Note: this API is not yet available on LanceDB Cloud
#### Parameters
| Name | Type | Description |
@@ -280,7 +282,7 @@ Clean up old versions of the table, freeing disk space.
#### Defined in
[index.ts:808](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L808)
[index.ts:833](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L833)
___
@@ -293,6 +295,8 @@ Run the compaction process on the table.
This can be run after making several small appends to optimize the table
for faster reads.
Note: this API is not yet available on LanceDB Cloud
#### Parameters
| Name | Type | Description |
@@ -307,7 +311,7 @@ Metrics about the compaction operation.
#### Defined in
[index.ts:831](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L831)
[index.ts:857](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L857)
___
@@ -327,7 +331,7 @@ Returns the number of rows in this table.
#### Defined in
[index.ts:749](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L749)
[index.ts:773](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L773)
___
@@ -357,7 +361,7 @@ VectorIndexParams.
#### Defined in
[index.ts:734](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L734)
[index.ts:758](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L758)
___
@@ -392,7 +396,7 @@ await table.createScalarIndex('my_col')
#### Defined in
[index.ts:742](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L742)
[index.ts:766](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L766)
___
@@ -418,7 +422,7 @@ Delete rows from this table.
#### Defined in
[index.ts:758](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L758)
[index.ts:782](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L782)
___
@@ -440,7 +444,7 @@ Creates a filter query to find all rows matching the specified criteria
#### Defined in
[index.ts:684](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L684)
[index.ts:691](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L691)
___
@@ -454,7 +458,7 @@ ___
#### Defined in
[index.ts:854](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L854)
[index.ts:880](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L880)
___
@@ -480,7 +484,7 @@ Get statistics about an index.
#### Defined in
[index.ts:845](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L845)
[index.ts:871](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L871)
___
@@ -500,7 +504,7 @@ List the indicies on this table.
#### Defined in
[index.ts:841](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L841)
[index.ts:867](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L867)
___
@@ -514,7 +518,7 @@ Insert records into this Table, replacing its contents.
| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table Type Table is ArrowTable |
#### Returns
@@ -528,7 +532,7 @@ The number of rows added to the table
#### Defined in
[index.ts:716](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L716)
[index.ts:732](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L732)
___
@@ -554,7 +558,7 @@ Creates a search query to find the nearest neighbors of the given search term
#### Defined in
[index.ts:676](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L676)
[index.ts:683](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L683)
___
@@ -580,4 +584,4 @@ Update rows in this table.
#### Defined in
[index.ts:771](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L771)
[index.ts:795](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L795)

View File

@@ -0,0 +1,56 @@
[vectordb](../README.md) / [Exports](../modules.md) / MakeArrowTableOptions
# Class: MakeArrowTableOptions
Options to control the makeArrowTable call.
## Table of contents
### Constructors
- [constructor](MakeArrowTableOptions.md#constructor)
### Properties
- [schema](MakeArrowTableOptions.md#schema)
- [vectorColumns](MakeArrowTableOptions.md#vectorcolumns)
## Constructors
### constructor
**new MakeArrowTableOptions**(`values?`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `values?` | `Partial`\<[`MakeArrowTableOptions`](MakeArrowTableOptions.md)\> |
#### Defined in
[arrow.ts:56](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/arrow.ts#L56)
## Properties
### schema
`Optional` **schema**: `Schema`\<`any`\>
Provided schema.
#### Defined in
[arrow.ts:49](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/arrow.ts#L49)
___
### vectorColumns
**vectorColumns**: `Record`\<`string`, `VectorColumnOptions`\>
Vector columns
#### Defined in
[arrow.ts:52](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/arrow.ts#L52)

View File

@@ -40,7 +40,7 @@ An embedding function that automatically creates vector representation for a giv
#### Defined in
[embedding/openai.ts:21](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/openai.ts#L21)
[embedding/openai.ts:22](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/embedding/openai.ts#L22)
## Properties
@@ -50,17 +50,17 @@ An embedding function that automatically creates vector representation for a giv
#### Defined in
[embedding/openai.ts:19](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/openai.ts#L19)
[embedding/openai.ts:20](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/embedding/openai.ts#L20)
___
### \_openai
`Private` `Readonly` **\_openai**: `any`
`Private` `Readonly` **\_openai**: `OpenAI`
#### Defined in
[embedding/openai.ts:18](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/openai.ts#L18)
[embedding/openai.ts:19](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/embedding/openai.ts#L19)
___
@@ -76,7 +76,7 @@ The name of the column that will be used as input for the Embedding Function.
#### Defined in
[embedding/openai.ts:50](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/openai.ts#L50)
[embedding/openai.ts:56](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/embedding/openai.ts#L56)
## Methods
@@ -102,4 +102,4 @@ Creates a vector representation for the given values.
#### Defined in
[embedding/openai.ts:38](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/openai.ts#L38)
[embedding/openai.ts:43](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/embedding/openai.ts#L43)

View File

@@ -65,7 +65,7 @@ A builder for nearest neighbor queries for LanceDB.
#### Defined in
[query.ts:38](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L38)
[query.ts:38](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L38)
## Properties
@@ -75,7 +75,7 @@ A builder for nearest neighbor queries for LanceDB.
#### Defined in
[query.ts:36](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L36)
[query.ts:36](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L36)
___
@@ -85,7 +85,7 @@ ___
#### Defined in
[query.ts:33](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L33)
[query.ts:33](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L33)
___
@@ -95,7 +95,7 @@ ___
#### Defined in
[query.ts:29](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L29)
[query.ts:29](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L29)
___
@@ -105,7 +105,7 @@ ___
#### Defined in
[query.ts:34](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L34)
[query.ts:34](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L34)
___
@@ -115,7 +115,7 @@ ___
#### Defined in
[query.ts:31](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L31)
[query.ts:31](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L31)
___
@@ -125,7 +125,7 @@ ___
#### Defined in
[query.ts:35](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L35)
[query.ts:35](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L35)
___
@@ -135,7 +135,7 @@ ___
#### Defined in
[query.ts:26](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L26)
[query.ts:26](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L26)
___
@@ -145,7 +145,7 @@ ___
#### Defined in
[query.ts:28](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L28)
[query.ts:28](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L28)
___
@@ -155,7 +155,7 @@ ___
#### Defined in
[query.ts:30](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L30)
[query.ts:30](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L30)
___
@@ -165,7 +165,7 @@ ___
#### Defined in
[query.ts:32](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L32)
[query.ts:32](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L32)
___
@@ -175,7 +175,7 @@ ___
#### Defined in
[query.ts:27](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L27)
[query.ts:27](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L27)
___
@@ -201,7 +201,7 @@ A filter statement to be applied to this query.
#### Defined in
[query.ts:87](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L87)
[query.ts:87](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L87)
## Methods
@@ -223,7 +223,7 @@ Execute the query and return the results as an Array of Objects
#### Defined in
[query.ts:115](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L115)
[query.ts:115](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L115)
___
@@ -245,7 +245,7 @@ A filter statement to be applied to this query.
#### Defined in
[query.ts:82](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L82)
[query.ts:82](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L82)
___
@@ -259,7 +259,7 @@ ___
#### Defined in
[query.ts:142](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L142)
[query.ts:143](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L143)
___
@@ -281,7 +281,7 @@ Sets the number of results that will be returned
#### Defined in
[query.ts:55](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L55)
[query.ts:55](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L55)
___
@@ -307,7 +307,7 @@ MetricType for the different options
#### Defined in
[query.ts:102](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L102)
[query.ts:102](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L102)
___
@@ -329,7 +329,7 @@ The number of probes used. A higher number makes search more accurate but also s
#### Defined in
[query.ts:73](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L73)
[query.ts:73](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L73)
___
@@ -349,7 +349,7 @@ ___
#### Defined in
[query.ts:107](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L107)
[query.ts:107](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L107)
___
@@ -371,7 +371,7 @@ Refine the results by reading extra elements and re-ranking them in memory.
#### Defined in
[query.ts:64](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L64)
[query.ts:64](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L64)
___
@@ -393,4 +393,4 @@ Return only the specified columns.
#### Defined in
[query.ts:93](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/query.ts#L93)
[query.ts:93](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/query.ts#L93)

View File

@@ -0,0 +1,224 @@
[vectordb](../README.md) / [Exports](../modules.md) / RemoteConnection
# Class: RemoteConnection
Remote connection.
## Implements
- [`Connection`](../interfaces/Connection.md)
## Table of contents
### Constructors
- [constructor](RemoteConnection.md#constructor)
### Properties
- [\_client](RemoteConnection.md#_client)
- [\_dbName](RemoteConnection.md#_dbname)
### Accessors
- [uri](RemoteConnection.md#uri)
### Methods
- [createTable](RemoteConnection.md#createtable)
- [dropTable](RemoteConnection.md#droptable)
- [openTable](RemoteConnection.md#opentable)
- [tableNames](RemoteConnection.md#tablenames)
## Constructors
### constructor
**new RemoteConnection**(`opts`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `opts` | [`ConnectionOptions`](../interfaces/ConnectionOptions.md) |
#### Defined in
[remote/index.ts:48](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L48)
## Properties
### \_client
`Private` `Readonly` **\_client**: `HttpLancedbClient`
#### Defined in
[remote/index.ts:45](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L45)
___
### \_dbName
`Private` `Readonly` **\_dbName**: `string`
#### Defined in
[remote/index.ts:46](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L46)
## Accessors
### uri
`get` **uri**(): `string`
#### Returns
`string`
#### Implementation of
[Connection](../interfaces/Connection.md).[uri](../interfaces/Connection.md#uri)
#### Defined in
[remote/index.ts:75](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L75)
## Methods
### createTable
**createTable**\<`T`\>(`nameOrOpts`, `data?`, `optsOrEmbedding?`, `opt?`): `Promise`\<[`Table`](../interfaces/Table.md)\<`T`\>\>
Creates a new Table, optionally initializing it with new data.
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `nameOrOpts` | `string` \| [`CreateTableOptions`](../interfaces/CreateTableOptions.md)\<`T`\> |
| `data?` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] |
| `optsOrEmbedding?` | [`WriteOptions`](../interfaces/WriteOptions.md) \| [`EmbeddingFunction`](../interfaces/EmbeddingFunction.md)\<`T`\> |
| `opt?` | [`WriteOptions`](../interfaces/WriteOptions.md) |
#### Returns
`Promise`\<[`Table`](../interfaces/Table.md)\<`T`\>\>
#### Implementation of
[Connection](../interfaces/Connection.md).[createTable](../interfaces/Connection.md#createtable)
#### Defined in
[remote/index.ts:107](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L107)
___
### dropTable
**dropTable**(`name`): `Promise`\<`void`\>
Drop an existing table.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the table to drop. |
#### Returns
`Promise`\<`void`\>
#### Implementation of
[Connection](../interfaces/Connection.md).[dropTable](../interfaces/Connection.md#droptable)
#### Defined in
[remote/index.ts:175](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L175)
___
### openTable
**openTable**(`name`): `Promise`\<[`Table`](../interfaces/Table.md)\<`number`[]\>\>
Open a table in the database.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the table. |
#### Returns
`Promise`\<[`Table`](../interfaces/Table.md)\<`number`[]\>\>
#### Implementation of
[Connection](../interfaces/Connection.md).[openTable](../interfaces/Connection.md#opentable)
#### Defined in
[remote/index.ts:91](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L91)
**openTable**\<`T`\>(`name`, `embeddings`): `Promise`\<[`Table`](../interfaces/Table.md)\<`T`\>\>
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `name` | `string` |
| `embeddings` | [`EmbeddingFunction`](../interfaces/EmbeddingFunction.md)\<`T`\> |
#### Returns
`Promise`\<[`Table`](../interfaces/Table.md)\<`T`\>\>
#### Implementation of
Connection.openTable
#### Defined in
[remote/index.ts:92](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L92)
___
### tableNames
**tableNames**(`pageToken?`, `limit?`): `Promise`\<`string`[]\>
#### Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| `pageToken` | `string` | `''` |
| `limit` | `number` | `10` |
#### Returns
`Promise`\<`string`[]\>
#### Implementation of
[Connection](../interfaces/Connection.md).[tableNames](../interfaces/Connection.md#tablenames)
#### Defined in
[remote/index.ts:80](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L80)

View File

@@ -0,0 +1,470 @@
[vectordb](../README.md) / [Exports](../modules.md) / RemoteTable
# Class: RemoteTable\<T\>
A LanceDB Table is the collection of Records. Each Record has one or more vector fields.
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | `number`[] |
## Implements
- [`Table`](../interfaces/Table.md)\<`T`\>
## Table of contents
### Constructors
- [constructor](RemoteTable.md#constructor)
### Properties
- [\_client](RemoteTable.md#_client)
- [\_embeddings](RemoteTable.md#_embeddings)
- [\_name](RemoteTable.md#_name)
### Accessors
- [name](RemoteTable.md#name)
- [schema](RemoteTable.md#schema)
### Methods
- [add](RemoteTable.md#add)
- [countRows](RemoteTable.md#countrows)
- [createIndex](RemoteTable.md#createindex)
- [createScalarIndex](RemoteTable.md#createscalarindex)
- [delete](RemoteTable.md#delete)
- [indexStats](RemoteTable.md#indexstats)
- [listIndices](RemoteTable.md#listindices)
- [overwrite](RemoteTable.md#overwrite)
- [search](RemoteTable.md#search)
- [update](RemoteTable.md#update)
## Constructors
### constructor
**new RemoteTable**\<`T`\>(`client`, `name`)
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | `number`[] |
#### Parameters
| Name | Type |
| :------ | :------ |
| `client` | `HttpLancedbClient` |
| `name` | `string` |
#### Defined in
[remote/index.ts:234](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L234)
**new RemoteTable**\<`T`\>(`client`, `name`, `embeddings`)
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | `number`[] |
#### Parameters
| Name | Type |
| :------ | :------ |
| `client` | `HttpLancedbClient` |
| `name` | `string` |
| `embeddings` | [`EmbeddingFunction`](../interfaces/EmbeddingFunction.md)\<`T`\> |
#### Defined in
[remote/index.ts:235](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L235)
## Properties
### \_client
`Private` `Readonly` **\_client**: `HttpLancedbClient`
#### Defined in
[remote/index.ts:230](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L230)
___
### \_embeddings
`Private` `Optional` `Readonly` **\_embeddings**: [`EmbeddingFunction`](../interfaces/EmbeddingFunction.md)\<`T`\>
#### Defined in
[remote/index.ts:231](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L231)
___
### \_name
`Private` `Readonly` **\_name**: `string`
#### Defined in
[remote/index.ts:232](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L232)
## Accessors
### name
`get` **name**(): `string`
#### Returns
`string`
#### Implementation of
[Table](../interfaces/Table.md).[name](../interfaces/Table.md#name)
#### Defined in
[remote/index.ts:250](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L250)
___
### schema
`get` **schema**(): `Promise`\<`any`\>
#### Returns
`Promise`\<`any`\>
#### Implementation of
[Table](../interfaces/Table.md).[schema](../interfaces/Table.md#schema)
#### Defined in
[remote/index.ts:254](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L254)
## Methods
### add
**add**(`data`): `Promise`\<`number`\>
Insert records into this Table.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
#### Returns
`Promise`\<`number`\>
The number of rows added to the table
#### Implementation of
[Table](../interfaces/Table.md).[add](../interfaces/Table.md#add)
#### Defined in
[remote/index.ts:273](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L273)
___
### countRows
**countRows**(): `Promise`\<`number`\>
Returns the number of rows in this table.
#### Returns
`Promise`\<`number`\>
#### Implementation of
[Table](../interfaces/Table.md).[countRows](../interfaces/Table.md#countrows)
#### Defined in
[remote/index.ts:372](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L372)
___
### createIndex
**createIndex**(`indexParams`): `Promise`\<`void`\>
Create an ANN index on this Table vector index.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `indexParams` | [`IvfPQIndexConfig`](../interfaces/IvfPQIndexConfig.md) | The parameters of this Index, |
#### Returns
`Promise`\<`void`\>
**`See`**
VectorIndexParams.
#### Implementation of
[Table](../interfaces/Table.md).[createIndex](../interfaces/Table.md#createindex)
#### Defined in
[remote/index.ts:326](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L326)
___
### createScalarIndex
**createScalarIndex**(`column`, `replace`): `Promise`\<`void`\>
Create a scalar index on this Table for the given column
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `column` | `string` | The column to index |
| `replace` | `boolean` | If false, fail if an index already exists on the column Scalar indices, like vector indices, can be used to speed up scans. A scalar index can speed up scans that contain filter expressions on the indexed column. For example, the following scan will be faster if the column `my_col` has a scalar index: ```ts const con = await lancedb.connect('./.lancedb'); const table = await con.openTable('images'); const results = await table.where('my_col = 7').execute(); ``` Scalar indices can also speed up scans containing a vector search and a prefilter: ```ts const con = await lancedb.connect('././lancedb'); const table = await con.openTable('images'); const results = await table.search([1.0, 2.0]).where('my_col != 7').prefilter(true); ``` Scalar indices can only speed up scans for basic filters using equality, comparison, range (e.g. `my_col BETWEEN 0 AND 100`), and set membership (e.g. `my_col IN (0, 1, 2)`) Scalar indices can be used if the filter contains multiple indexed columns and the filter criteria are AND'd or OR'd together (e.g. `my_col < 0 AND other_col> 100`) Scalar indices may be used if the filter contains non-indexed columns but, depending on the structure of the filter, they may not be usable. For example, if the column `not_indexed` does not have a scalar index then the filter `my_col = 0 OR not_indexed = 1` will not be able to use any scalar index on `my_col`. |
#### Returns
`Promise`\<`void`\>
**`Examples`**
```ts
const con = await lancedb.connect('././lancedb')
const table = await con.openTable('images')
await table.createScalarIndex('my_col')
```
#### Implementation of
[Table](../interfaces/Table.md).[createScalarIndex](../interfaces/Table.md#createscalarindex)
#### Defined in
[remote/index.ts:368](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L368)
___
### delete
▸ **delete**(`filter`): `Promise`\<`void`\>
Delete rows from this table.
This can be used to delete a single row, many rows, all rows, or
sometimes no rows (if your predicate matches nothing).
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `filter` | `string` | A filter in the same format used by a sql WHERE clause. The filter must not be empty. |
#### Returns
`Promise`\<`void`\>
**`Examples`**
```ts
const con = await lancedb.connect("./.lancedb")
const data = [
{id: 1, vector: [1, 2]},
{id: 2, vector: [3, 4]},
{id: 3, vector: [5, 6]},
];
const tbl = await con.createTable("my_table", data)
await tbl.delete("id = 2")
await tbl.countRows() // Returns 2
```
If you have a list of values to delete, you can combine them into a
stringified list and use the `IN` operator:
```ts
const to_remove = [1, 5];
await tbl.delete(`id IN (${to_remove.join(",")})`)
await tbl.countRows() // Returns 1
```
#### Implementation of
[Table](../interfaces/Table.md).[delete](../interfaces/Table.md#delete)
#### Defined in
[remote/index.ts:377](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L377)
___
### indexStats
▸ **indexStats**(`indexUuid`): `Promise`\<[`IndexStats`](../interfaces/IndexStats.md)\>
Get statistics about an index.
#### Parameters
| Name | Type |
| :------ | :------ |
| `indexUuid` | `string` |
#### Returns
`Promise`\<[`IndexStats`](../interfaces/IndexStats.md)\>
#### Implementation of
[Table](../interfaces/Table.md).[indexStats](../interfaces/Table.md#indexstats)
#### Defined in
[remote/index.ts:414](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L414)
___
### listIndices
▸ **listIndices**(): `Promise`\<[`VectorIndex`](../interfaces/VectorIndex.md)[]\>
List the indicies on this table.
#### Returns
`Promise`\<[`VectorIndex`](../interfaces/VectorIndex.md)[]\>
#### Implementation of
[Table](../interfaces/Table.md).[listIndices](../interfaces/Table.md#listindices)
#### Defined in
[remote/index.ts:403](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L403)
___
### overwrite
▸ **overwrite**(`data`): `Promise`\<`number`\>
Insert records into this Table, replacing its contents.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
#### Returns
`Promise`\<`number`\>
The number of rows added to the table
#### Implementation of
[Table](../interfaces/Table.md).[overwrite](../interfaces/Table.md#overwrite)
#### Defined in
[remote/index.ts:300](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L300)
___
### search
▸ **search**(`query`): [`Query`](Query.md)\<`T`\>
Creates a search query to find the nearest neighbors of the given search term
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `query` | `T` | The query search term |
#### Returns
[`Query`](Query.md)\<`T`\>
#### Implementation of
[Table](../interfaces/Table.md).[search](../interfaces/Table.md#search)
#### Defined in
[remote/index.ts:269](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L269)
___
### update
▸ **update**(`args`): `Promise`\<`void`\>
Update rows in this table.
This can be used to update a single row, many rows, all rows, or
sometimes no rows (if your predicate matches nothing).
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `args` | [`UpdateArgs`](../interfaces/UpdateArgs.md) \| [`UpdateSqlArgs`](../interfaces/UpdateSqlArgs.md) | see [UpdateArgs](../interfaces/UpdateArgs.md) and [UpdateSqlArgs](../interfaces/UpdateSqlArgs.md) for more details |
#### Returns
`Promise`\<`void`\>
**`Examples`**
```ts
const con = await lancedb.connect("./.lancedb")
const data = [
{id: 1, vector: [3, 3], name: 'Ye'},
{id: 2, vector: [4, 4], name: 'Mike'},
];
const tbl = await con.createTable("my_table", data)
await tbl.update({
where: "id = 2",
values: { vector: [2, 2], name: "Michael" },
})
let results = await tbl.search([1, 1]).execute();
// Returns [
// {id: 2, vector: [2, 2], name: 'Michael'}
// {id: 1, vector: [3, 3], name: 'Ye'}
// ]
```
#### Implementation of
[Table](../interfaces/Table.md).[update](../interfaces/Table.md#update)
#### Defined in
[remote/index.ts:383](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/remote/index.ts#L383)

View File

@@ -22,7 +22,7 @@ Cosine distance
#### Defined in
[index.ts:1041](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1041)
[index.ts:1092](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1092)
___
@@ -34,7 +34,7 @@ Dot product
#### Defined in
[index.ts:1046](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1046)
[index.ts:1097](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1097)
___
@@ -46,4 +46,4 @@ Euclidean distance
#### Defined in
[index.ts:1036](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1036)
[index.ts:1087](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1087)

View File

@@ -22,7 +22,7 @@ Append new data to the table.
#### Defined in
[index.ts:1007](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1007)
[index.ts:1058](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1058)
___
@@ -34,7 +34,7 @@ Create a new [Table](../interfaces/Table.md).
#### Defined in
[index.ts:1003](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1003)
[index.ts:1054](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1054)
___
@@ -46,4 +46,4 @@ Overwrite the existing [Table](../interfaces/Table.md) if presented.
#### Defined in
[index.ts:1005](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1005)
[index.ts:1056](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1056)

View File

@@ -18,7 +18,7 @@
#### Defined in
[index.ts:54](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L54)
[index.ts:57](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L57)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[index.ts:56](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L56)
[index.ts:59](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L59)
___
@@ -38,4 +38,4 @@ ___
#### Defined in
[index.ts:58](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L58)
[index.ts:61](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L61)

View File

@@ -19,7 +19,7 @@ The number of bytes removed from disk.
#### Defined in
[index.ts:878](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L878)
[index.ts:904](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L904)
___
@@ -31,4 +31,4 @@ The number of old table versions removed.
#### Defined in
[index.ts:882](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L882)
[index.ts:908](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L908)

View File

@@ -22,7 +22,7 @@ fragments added.
#### Defined in
[index.ts:933](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L933)
[index.ts:959](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L959)
___
@@ -35,7 +35,7 @@ file.
#### Defined in
[index.ts:928](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L928)
[index.ts:954](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L954)
___
@@ -47,7 +47,7 @@ The number of new fragments that were created.
#### Defined in
[index.ts:923](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L923)
[index.ts:949](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L949)
___
@@ -59,4 +59,4 @@ The number of fragments that were removed.
#### Defined in
[index.ts:919](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L919)
[index.ts:945](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L945)

View File

@@ -24,7 +24,7 @@ Default is true.
#### Defined in
[index.ts:901](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L901)
[index.ts:927](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L927)
___
@@ -38,7 +38,7 @@ the deleted rows. Default is 10%.
#### Defined in
[index.ts:907](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L907)
[index.ts:933](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L933)
___
@@ -50,7 +50,7 @@ The maximum number of rows per group. Defaults to 1024.
#### Defined in
[index.ts:895](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L895)
[index.ts:921](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L921)
___
@@ -63,7 +63,7 @@ the number of cores on the machine.
#### Defined in
[index.ts:912](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L912)
[index.ts:938](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L938)
___
@@ -77,4 +77,4 @@ Defaults to 1024 * 1024.
#### Defined in
[index.ts:891](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L891)
[index.ts:917](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L917)

View File

@@ -9,6 +9,7 @@ Connection could be local against filesystem or remote against a server.
## Implemented by
- [`LocalConnection`](../classes/LocalConnection.md)
- [`RemoteConnection`](../classes/RemoteConnection.md)
## Table of contents
@@ -31,7 +32,7 @@ Connection could be local against filesystem or remote against a server.
#### Defined in
[index.ts:183](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L183)
[index.ts:188](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L188)
## Methods
@@ -59,7 +60,7 @@ Creates a new Table, optionally initializing it with new data.
#### Defined in
[index.ts:207](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L207)
[index.ts:212](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L212)
**createTable**(`name`, `data`): `Promise`\<[`Table`](Table.md)\<`number`[]\>\>
@@ -70,7 +71,7 @@ Creates a new Table and initialize it with new data.
| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the table. |
| `data` | `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
#### Returns
@@ -78,7 +79,7 @@ Creates a new Table and initialize it with new data.
#### Defined in
[index.ts:221](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L221)
[index.ts:226](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L226)
**createTable**(`name`, `data`, `options`): `Promise`\<[`Table`](Table.md)\<`number`[]\>\>
@@ -89,7 +90,7 @@ Creates a new Table and initialize it with new data.
| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the table. |
| `data` | `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
| `options` | [`WriteOptions`](WriteOptions.md) | The write options to use when creating the table. |
#### Returns
@@ -98,7 +99,7 @@ Creates a new Table and initialize it with new data.
#### Defined in
[index.ts:233](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L233)
[index.ts:238](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L238)
**createTable**\<`T`\>(`name`, `data`, `embeddings`): `Promise`\<[`Table`](Table.md)\<`T`\>\>
@@ -115,7 +116,7 @@ Creates a new Table and initialize it with new data.
| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the table. |
| `data` | `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
| `embeddings` | [`EmbeddingFunction`](EmbeddingFunction.md)\<`T`\> | An embedding function to use on this table |
#### Returns
@@ -124,7 +125,7 @@ Creates a new Table and initialize it with new data.
#### Defined in
[index.ts:246](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L246)
[index.ts:251](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L251)
**createTable**\<`T`\>(`name`, `data`, `embeddings`, `options`): `Promise`\<[`Table`](Table.md)\<`T`\>\>
@@ -141,7 +142,7 @@ Creates a new Table and initialize it with new data.
| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the table. |
| `data` | `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Non-empty Array of Records to be inserted into the table |
| `embeddings` | [`EmbeddingFunction`](EmbeddingFunction.md)\<`T`\> | An embedding function to use on this table |
| `options` | [`WriteOptions`](WriteOptions.md) | The write options to use when creating the table. |
@@ -151,7 +152,7 @@ Creates a new Table and initialize it with new data.
#### Defined in
[index.ts:259](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L259)
[index.ts:264](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L264)
___
@@ -173,7 +174,7 @@ Drop an existing table.
#### Defined in
[index.ts:270](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L270)
[index.ts:275](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L275)
___
@@ -202,7 +203,7 @@ Open a table in the database.
#### Defined in
[index.ts:193](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L193)
[index.ts:198](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L198)
___
@@ -216,4 +217,4 @@ ___
#### Defined in
[index.ts:185](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L185)
[index.ts:190](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L190)

View File

@@ -19,9 +19,13 @@
`Optional` **apiKey**: `string`
API key for the remote connections
Can also be passed by setting environment variable `LANCEDB_API_KEY`
#### Defined in
[index.ts:81](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L81)
[index.ts:88](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L88)
___
@@ -35,7 +39,7 @@ If not provided, LanceDB will use the default credentials provider chain.
#### Defined in
[index.ts:75](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L75)
[index.ts:78](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L78)
___
@@ -47,7 +51,7 @@ AWS region to connect to. Default is defaultAwsRegion.
#### Defined in
[index.ts:78](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L78)
[index.ts:81](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L81)
___
@@ -55,13 +59,13 @@ ___
`Optional` **hostOverride**: `string`
Override the host URL for the remote connections.
Override the host URL for the remote connection.
This is useful for local testing.
#### Defined in
[index.ts:91](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L91)
[index.ts:98](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L98)
___
@@ -73,7 +77,7 @@ Region to connect
#### Defined in
[index.ts:84](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L84)
[index.ts:91](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L91)
___
@@ -85,8 +89,8 @@ LanceDB database URI.
- `/path/to/database` - local database
- `s3://bucket/path/to/database` or `gs://bucket/path/to/database` - database on cloud storage
- `db://host:port` - remote database (SaaS)
- `db://host:port` - remote database (LanceDB cloud)
#### Defined in
[index.ts:69](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L69)
[index.ts:72](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L72)

View File

@@ -26,7 +26,7 @@
#### Defined in
[index.ts:116](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L116)
[index.ts:121](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L121)
___
@@ -36,7 +36,7 @@ ___
#### Defined in
[index.ts:122](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L122)
[index.ts:127](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L127)
___
@@ -46,7 +46,7 @@ ___
#### Defined in
[index.ts:113](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L113)
[index.ts:118](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L118)
___
@@ -56,7 +56,7 @@ ___
#### Defined in
[index.ts:119](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L119)
[index.ts:124](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L124)
___
@@ -66,4 +66,4 @@ ___
#### Defined in
[index.ts:125](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L125)
[index.ts:130](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L130)

View File

@@ -45,7 +45,7 @@ Creates a vector representation for the given values.
#### Defined in
[embedding/embedding_function.ts:27](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/embedding_function.ts#L27)
[embedding/embedding_function.ts:27](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/embedding/embedding_function.ts#L27)
___
@@ -57,4 +57,4 @@ The name of the column that will be used as input for the Embedding Function.
#### Defined in
[embedding/embedding_function.ts:22](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/embedding_function.ts#L22)
[embedding/embedding_function.ts:22](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/embedding/embedding_function.ts#L22)

View File

@@ -17,7 +17,7 @@
#### Defined in
[index.ts:478](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L478)
[index.ts:485](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L485)
___
@@ -27,4 +27,4 @@ ___
#### Defined in
[index.ts:479](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L479)
[index.ts:486](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L486)

View File

@@ -29,7 +29,7 @@ The column to be indexed
#### Defined in
[index.ts:942](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L942)
[index.ts:968](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L968)
___
@@ -41,7 +41,7 @@ Cache size of the index
#### Defined in
[index.ts:991](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L991)
[index.ts:1042](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1042)
___
@@ -49,11 +49,11 @@ ___
`Optional` **index\_name**: `string`
A unique name for the index
Note: this parameter is not supported on LanceDB Cloud
#### Defined in
[index.ts:947](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L947)
[index.ts:976](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L976)
___
@@ -61,11 +61,11 @@ ___
`Optional` **max\_iters**: `number`
The max number of iterations for kmeans training.
Note: this parameter is not yet supported on LanceDB Cloud
#### Defined in
[index.ts:962](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L962)
[index.ts:997](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L997)
___
@@ -73,11 +73,11 @@ ___
`Optional` **max\_opq\_iters**: `number`
Max number of iterations to train OPQ, if `use_opq` is true.
Note: this parameter is not yet supported on LanceDB Cloud
#### Defined in
[index.ts:981](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L981)
[index.ts:1029](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1029)
___
@@ -89,7 +89,7 @@ Metric type, L2 or Cosine
#### Defined in
[index.ts:952](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L952)
[index.ts:981](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L981)
___
@@ -97,11 +97,11 @@ ___
`Optional` **num\_bits**: `number`
The number of bits to present one PQ centroid.
Note: this parameter is not yet supported on LanceDB Cloud
#### Defined in
[index.ts:976](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L976)
[index.ts:1021](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1021)
___
@@ -109,11 +109,11 @@ ___
`Optional` **num\_partitions**: `number`
The number of partitions this index
Note: this parameter is not yet supported on LanceDB Cloud
#### Defined in
[index.ts:957](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L957)
[index.ts:989](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L989)
___
@@ -121,11 +121,11 @@ ___
`Optional` **num\_sub\_vectors**: `number`
Number of subvectors to build PQ code
Note: this parameter is not yet supported on LanceDB Cloud
#### Defined in
[index.ts:972](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L972)
[index.ts:1013](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1013)
___
@@ -133,11 +133,11 @@ ___
`Optional` **replace**: `boolean`
Replace an existing index with the same name if it exists.
Note: this parameter is not yet supported on LanceDB Cloud
#### Defined in
[index.ts:986](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L986)
[index.ts:1037](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1037)
___
@@ -147,7 +147,7 @@ ___
#### Defined in
[index.ts:993](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L993)
[index.ts:1044](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1044)
___
@@ -155,8 +155,8 @@ ___
• `Optional` **use\_opq**: `boolean`
Train as optimized product quantization.
Note: this parameter is not yet supported on LanceDB Cloud
#### Defined in
[index.ts:967](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L967)
[index.ts:1005](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1005)

View File

@@ -13,6 +13,7 @@ A LanceDB Table is the collection of Records. Each Record has one or more vector
## Implemented by
- [`LocalTable`](../classes/LocalTable.md)
- [`RemoteTable`](../classes/RemoteTable.md)
## Table of contents
@@ -35,7 +36,7 @@ A LanceDB Table is the collection of Records. Each Record has one or more vector
### add
**add**: (`data`: `Record`\<`string`, `unknown`\>[]) => `Promise`\<`number`\>
**add**: (`data`: `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[]) => `Promise`\<`number`\>
#### Type declaration
@@ -47,7 +48,7 @@ Insert records into this Table.
| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
##### Returns
@@ -57,7 +58,7 @@ The number of rows added to the table
#### Defined in
[index.ts:291](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L291)
[index.ts:296](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L296)
___
@@ -77,7 +78,7 @@ Returns the number of rows in this table.
#### Defined in
[index.ts:361](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L361)
[index.ts:368](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L368)
___
@@ -107,7 +108,7 @@ VectorIndexParams.
#### Defined in
[index.ts:306](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L306)
[index.ts:313](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L313)
___
@@ -142,7 +143,7 @@ await table.createScalarIndex('my_col')
#### Defined in
[index.ts:356](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L356)
[index.ts:363](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L363)
___
@@ -194,7 +195,7 @@ await tbl.countRows() // Returns 1
#### Defined in
[index.ts:395](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L395)
[index.ts:402](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L402)
___
@@ -220,7 +221,7 @@ Get statistics about an index.
#### Defined in
[index.ts:438](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L438)
[index.ts:445](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L445)
___
@@ -240,7 +241,7 @@ List the indicies on this table.
#### Defined in
[index.ts:433](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L433)
[index.ts:440](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L440)
___
@@ -250,13 +251,13 @@ ___
#### Defined in
[index.ts:277](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L277)
[index.ts:282](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L282)
___
### overwrite
• **overwrite**: (`data`: `Record`\<`string`, `unknown`\>[]) => `Promise`\<`number`\>
• **overwrite**: (`data`: `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[]) => `Promise`\<`number`\>
#### Type declaration
@@ -268,7 +269,7 @@ Insert records into this Table, replacing its contents.
| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
| `data` | `Table`\<`any`\> \| `Record`\<`string`, `unknown`\>[] | Records to be inserted into the Table |
##### Returns
@@ -278,7 +279,7 @@ The number of rows added to the table
#### Defined in
[index.ts:299](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L299)
[index.ts:304](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L304)
___
@@ -288,7 +289,7 @@ ___
#### Defined in
[index.ts:440](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L440)
[index.ts:447](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L447)
___
@@ -314,7 +315,7 @@ Creates a search query to find the nearest neighbors of the given search term
#### Defined in
[index.ts:283](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L283)
[index.ts:288](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L288)
___
@@ -365,4 +366,4 @@ let results = await tbl.search([1, 1]).execute();
#### Defined in
[index.ts:428](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L428)
[index.ts:435](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L435)

View File

@@ -20,7 +20,7 @@ new values to set
#### Defined in
[index.ts:454](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L454)
[index.ts:461](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L461)
___
@@ -33,4 +33,4 @@ in which case all rows will be updated.
#### Defined in
[index.ts:448](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L448)
[index.ts:455](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L455)

View File

@@ -20,7 +20,7 @@ new values to set as SQL expressions.
#### Defined in
[index.ts:468](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L468)
[index.ts:475](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L475)
___
@@ -33,4 +33,4 @@ in which case all rows will be updated.
#### Defined in
[index.ts:462](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L462)
[index.ts:469](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L469)

View File

@@ -18,7 +18,7 @@
#### Defined in
[index.ts:472](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L472)
[index.ts:479](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L479)
___
@@ -28,7 +28,7 @@ ___
#### Defined in
[index.ts:473](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L473)
[index.ts:480](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L480)
___
@@ -38,4 +38,4 @@ ___
#### Defined in
[index.ts:474](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L474)
[index.ts:481](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L481)

View File

@@ -24,4 +24,4 @@ A [WriteMode](../enums/WriteMode.md) to use on this operation
#### Defined in
[index.ts:1015](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/index.ts#L1015)
[index.ts:1066](https://github.com/lancedb/lancedb/blob/5228ca4/node/src/index.ts#L1066)

View File

@@ -1,20 +0,0 @@
# Python API Reference (SaaS)
This section contains the API reference for the SaaS Python API.
## Installation
```shell
pip install lancedb
```
## Connection
::: lancedb.connect
::: lancedb.remote.db.RemoteDBConnection
## Table
::: lancedb.remote.table.RemoteTable

View File

@@ -9,6 +9,7 @@ const excludedGlobs = [
"../src/embedding.md",
"../src/examples/*.md",
"../src/guides/tables.md",
"../src/guides/storage.md",
"../src/embeddings/*.md",
];

View File

@@ -1,6 +1,6 @@
// Copyright 2023 Lance Developers.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
@@ -49,6 +49,7 @@ export { Query }
export type { EmbeddingFunction }
export { OpenAIEmbeddingFunction } from './embedding/openai'
export { makeArrowTable, type MakeArrowTableOptions } from './arrow'
export { RemoteConnection, RemoteTable } from './remote'
const defaultAwsRegion = 'us-west-2'
@@ -725,6 +726,7 @@ export class LocalTable<T = number[]> implements Table<T> {
* Insert records into this Table, replacing its contents.
*
* @param data Records to be inserted into the Table
* Type Table is ArrowTable
* @return The number of rows added to the table
*/
async overwrite (
@@ -815,6 +817,7 @@ export class LocalTable<T = number[]> implements Table<T> {
/**
* Clean up old versions of the table, freeing disk space.
*
* Note: this API is not yet available on LanceDB Cloud
* @param olderThan The minimum age in minutes of the versions to delete. If not
* provided, defaults to two weeks.
* @param deleteUnverified Because they may be part of an in-progress
@@ -845,6 +848,7 @@ export class LocalTable<T = number[]> implements Table<T> {
* This can be run after making several small appends to optimize the table
* for faster reads.
*
* Note: this API is not yet available on LanceDB Cloud
* @param options Advanced options configuring compaction. In most cases, you
* can omit this arguments, as the default options are sensible
* for most tables.
@@ -966,6 +970,9 @@ export interface IvfPQIndexConfig {
/**
* A unique name for the index
*/
/**
* Note: this parameter is not supported on LanceDB Cloud
*/
index_name?: string
/**
@@ -976,35 +983,57 @@ export interface IvfPQIndexConfig {
/**
* The number of partitions this index
*/
/**
* Note: this parameter is not yet supported on LanceDB Cloud
*/
num_partitions?: number
/**
* The max number of iterations for kmeans training.
*/
/**
* Note: this parameter is not yet supported on LanceDB Cloud
*/
max_iters?: number
/**
* Train as optimized product quantization.
*/
/**
* Note: this parameter is not yet supported on LanceDB Cloud
*/
use_opq?: boolean
/**
* Number of subvectors to build PQ code
*/
/**
* Note: this parameter is not yet supported on LanceDB Cloud
*/
num_sub_vectors?: number
/**
* The number of bits to present one PQ centroid.
*/
/**
* Note: this parameter is not yet supported on LanceDB Cloud
*/
num_bits?: number
/**
* Max number of iterations to train OPQ, if `use_opq` is true.
*/
/**
* Note: this parameter is not yet supported on LanceDB Cloud
*/
max_opq_iters?: number
/**
* Replace an existing index with the same name if it exists.
*/
/**
* Note: this parameter is not yet supported on LanceDB Cloud
*/
replace?: boolean
/**

View File

@@ -87,16 +87,25 @@ class DBConnection(EnforceOverrides):
Can be either "create" or "overwrite".
By default, if the table already exists, an exception is raised.
If you want to overwrite the table, use mode="overwrite".
**Note: this parameter is not yet supported on LanceDB Cloud**
exist_ok: bool, default False
If a table by the same name already exists, then raise an exception
if exist_ok=False. If exist_ok=True, then open the existing table;
it will not add the provided data but will validate against any
schema that's specified.
**Note: this parameter is not yet supported on LanceDB Cloud**
on_bad_vectors: str, default "error"
What to do if any of the vectors are not the same size or contains NaNs.
One of "error", "drop", "fill".
fill_value: float
The value to use when filling vectors. Only used if on_bad_vectors="fill".
embedding_functions: List[EmbeddingFunctionConfig], default None
The embedding functions to be applied before inserting data to
LanceDB table.
**Note: this parameter is not yet supported on LanceDB Cloud**
Returns
-------
@@ -230,7 +239,9 @@ class DBConnection(EnforceOverrides):
def drop_database(self):
"""
Drop database
This is the same thing as dropping all the tables
This functions the same as dropping all the tables
**Note: this API is not yet available on LanceDB Cloud**
"""
raise NotImplementedError

View File

@@ -54,16 +54,16 @@ class RemoteTable(Table):
def to_arrow(self) -> pa.Table:
"""to_arrow() is not supported on the LanceDB cloud"""
raise NotImplementedError("to_arrow() is not supported on the LanceDB cloud")
raise NotImplementedError("to_arrow() is not yet supported on LanceDB Cloud")
def to_pandas(self):
"""to_pandas() is not supported on the LanceDB cloud"""
return NotImplementedError("to_pandas() is not supported on the LanceDB cloud")
return NotImplementedError("to_pandas() is not yet supported on LanceDB Cloud")
def create_scalar_index(self, *args, **kwargs):
"""Creates a scalar index"""
return NotImplementedError(
"create_scalar_index() is not supported on the LanceDB cloud"
"create_scalar_index() is not yet supported on LanceDB Cloud"
)
def create_index(

View File

@@ -178,6 +178,7 @@ class Table(ABC):
def to_pandas(self) -> "pd.DataFrame":
"""Return the table as a pandas DataFrame.
**Note: this API is not yet available on LanceDB Cloud**
Returns
-------
pd.DataFrame
@@ -188,6 +189,7 @@ class Table(ABC):
def to_arrow(self) -> pa.Table:
"""Return the table as a pyarrow Table.
**Note: this API is not yet available on LanceDB Cloud**
Returns
-------
pa.Table
@@ -215,18 +217,26 @@ class Table(ABC):
num_partitions: int, default 256
The number of IVF partitions to use when creating the index.
Default is 256.
**Note: this parameter is not supported on LanceDB Cloud**
num_sub_vectors: int, default 96
The number of PQ sub-vectors to use when creating the index.
Default is 96.
**Note: this parameter is not supported on LanceDB Cloud**
vector_column_name: str, default "vector"
The vector column name to create the index.
replace: bool, default True
- If True, replace the existing index if it exists.
- If False, raise an error if duplicate index exists.
**Note: this parameter is not yet supported on LanceDB Cloud**
accelerator: str, default None
If set, use the given accelerator to create the index.
Only support "cuda" for now.
**Note: this parameter is not yet supported on LanceDB Cloud**
index_cache_size : int, optional
The size of the index cache in number of entries. Default value is 256.
"""
@@ -241,6 +251,8 @@ class Table(ABC):
):
"""Create a scalar index on a column.
**Note: this API is not yet available on LanceDB Cloud**
Scalar indices, like vector indices, can be used to speed up scans. A scalar
index can speed up scans that contain filter expressions on the indexed column.
For example, the following scan will be faster if the column ``my_col`` has
@@ -396,6 +408,8 @@ class Table(ABC):
- If `query` is a string, then the query type is "vector" if the
table has embedding functions else the query type is "fts"
**Note: this parameter is not yet supported on LanceDB Cloud**
Returns
-------
LanceQueryBuilder