Use query.limit(..) in README (#543)

If you run the README javascript example in typescript, it complains
that the type of limit is a function and cannot be set to a number.
This commit is contained in:
Ankur Goyal
2023-10-11 11:54:14 -07:00
committed by Weston Pace
parent a26c8f3316
commit a737bbff19

View File

@@ -54,8 +54,7 @@ const table = await db.createTable('vectors',
[{ id: 1, vector: [0.1, 0.2], item: "foo", price: 10 },
{ id: 2, vector: [1.1, 1.2], item: "bar", price: 50 }])
const query = table.search([0.1, 0.3]);
query.limit = 20;
const query = table.search([0.1, 0.3]).limit(2);
const results = await query.execute();
```