Compare commits

...

2 Commits

Author SHA1 Message Date
albertlockett
8abd5c8d85 fix ann docs 2024-01-03 15:36:54 -05:00
albertlockett
1b455dbce8 fix saas test 2024-01-03 14:49:19 -05:00
2 changed files with 9 additions and 5 deletions

View File

@@ -164,6 +164,7 @@ You can further filter the elements returned by a search using a where clause.
const results_2 = await table
.search(Array(1536).fill(1.2))
.where("id != '1141'")
.limit(2)
.execute()
```
@@ -187,6 +188,7 @@ You can select the columns returned by the query using a select clause.
const results_3 = await table
.search(Array(1536).fill(1.2))
.select(["id"])
.limit(2)
.execute()
```

View File

@@ -37,8 +37,10 @@ yet support Windows or musl-based Linux (such as Alpine Linux).
## Example code
```javascript
// connect to a remote DB
const lancedb = require('vectordb');
const { Schema, Field, Int32, FixedSizeList, Float32 } = require('apache-arrow/Arrow.node')
// connect to a remote DB
const db = await lancedb.connect({
uri: "db://your-project-name",
apiKey: "sk_...",
@@ -58,11 +60,11 @@ const schema = new Schema(
new Field('price', new Float32())
]
)
const table = await db.createTable(
tableName,
const table = await db.createTable({
name: tableName,
schema,
data
)
}, data)
// list the table
const tableNames_1 = await db.tableNames('')
// add some data and search should be okay