From a737bbff19eb6168bf36caf6369abe4b2841e2ed Mon Sep 17 00:00:00 2001 From: Ankur Goyal Date: Wed, 11 Oct 2023 11:54:14 -0700 Subject: [PATCH] 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. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 3819a61c..b2790e4d 100644 --- a/README.md +++ b/README.md @@ -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(); ```