Skip to content

Commit 3d9ff72

Browse files
committed
Improved example [skip ci]
1 parent 2c8fe09 commit 3d9ff72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ index = Index(
234234
Get the nearest neighbors
235235

236236
```python
237-
session.scalars(select(Item).order_by(func.cast(Item.embedding, HALFVEC(3)).l2_distance([3, 1, 2])).limit(5))
237+
order = func.cast(Item.embedding, HALFVEC(3)).l2_distance([3, 1, 2])
238+
session.scalars(select(Item).order_by(order).limit(5))
238239
```
239240

240241
## SQLModel

0 commit comments

Comments
 (0)