Skip to content

Commit

Permalink
Updated example [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 25, 2023
1 parent 0b91a30 commit 29889ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Get the nearest neighbors to a vector
items, err := client.Item.
Query().
Order(func(s *sql.Selector) {
s.OrderExpr(sql.ExprP("embedding <-> $1", embedding))
s.OrderExpr(sql.ExprP("embedding <-> $1", pgvector.NewVector([]float32{1, 2, 3})))
}).
Limit(5).
All(ctx)
Expand Down

0 comments on commit 29889ec

Please sign in to comment.