docs: show the Python filtered refresh next to the SQL form (#4923)

Adds Python where= examples next to the SQL ones.

Also fixes two examples that fail:
- Date filters now use date '2026-01-01'. A bare string fails on DATE
and TIMESTAMP columns (see [Dates, Timestamps,
Decimals](https://docs.lancedb.com/search/filtering#dates-timestamps-decimals)).
- The first example reads results with table.search().to_arrow(),
because table.to_arrow() raises on Enterprise.

where= needs lancedb 0.42.0 or later.
This commit is contained in:
Brendan Clement
2026-11-09 09:51:48 -08:00
committed by GitHub
parent 1157a0709d
commit 94f366a11a
2 changed files with 29 additions and 12 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ REFRESH COLUMN <column> ON [TABLE] <table>
<CodeGroup>
```sql SQL icon="database"
REFRESH COLUMN doubled ON my_table
REFRESH COLUMN embedding ON documents WHERE created_at > '2026-01-01'
REFRESH COLUMN embedding ON documents WHERE created_at > date '2026-01-01'
```
</CodeGroup>
@@ -39,7 +39,7 @@ calls and their cost. To select only null outputs within a slice:
<CodeGroup>
```sql SQL icon="database"
REFRESH COLUMN embedding ON documents
WHERE created_at > '2026-01-01' AND embedding IS NULL
WHERE created_at > date '2026-01-01' AND embedding IS NULL
```
</CodeGroup>