Skip to content

Commit e1972c4

Browse files
authored
Update API.md
1 parent fdb6a5f commit e1972c4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

API.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,13 @@ This makes them ideal for combining vector search with additional query conditio
300300
-- Perform a filtered full scan
301301
SELECT rowid, distance
302302
FROM vector_full_scan_stream('documents', 'embedding', vector_as_f32('[0.1, 0.2, 0.3]'))
303-
WHERE category = 'science'
304303
LIMIT 5;
305304
```
306305

307306
```sql
308307
-- Perform a filtered approximate scan using quantized data
309308
SELECT rowid, distance
310309
FROM vector_quantize_scan_stream('documents', 'embedding', vector_as_f32('[0.1, 0.2, 0.3]'))
311-
WHERE score > 0.8
312310
LIMIT 10;
313311
```
314312

@@ -317,13 +315,13 @@ LIMIT 10;
317315
```sql
318316
-- Perform a filtered full scan with additional columns
319317
SELECT
320-
v.rowid AS sentence_id,
318+
v.rowid,
321319
row_number() OVER (ORDER BY v.distance) AS rank_number,
322320
v.distance
323321
FROM vector_full_scan_stream('documents', 'embedding', vector_as_f32('[0.1, 0.2, 0.3]')) AS v
324-
JOIN sentences ON sentences.rowid = v.rowid
325-
WHERE sentences.chunk_id = 297
326-
LIMIT 3;
322+
JOIN documents ON documents.rowid = v.rowid
323+
WHERE documents.category = 'science'
324+
LIMIT 10;
327325
```
328326

329327
**Usage Notes:**

0 commit comments

Comments
 (0)