Skip to content

Commit afcd67a

Browse files
committed
Updated readme [skip ci]
1 parent 9e1c421 commit afcd67a

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
@@ -155,7 +155,8 @@ Note: Add `'django.contrib.postgres'` to `INSTALLED_APPS` to use `OpClass`
155155
Get the nearest neighbors
156156

157157
```python
158-
Item.objects.order_by(L2Distance(Cast('embedding', HalfVectorField(dimensions=3)), [3, 1, 2]))[:5]
158+
distance = L2Distance(Cast('embedding', HalfVectorField(dimensions=3)), [3, 1, 2])
159+
Item.objects.order_by(distance)[:5]
159160
```
160161

161162
## SQLAlchemy

0 commit comments

Comments
 (0)