Skip to content

Commit c0b46bf

Browse files
committed
Improved examples
1 parent fee662c commit c0b46bf

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Follow the instructions for your database library:
1818
Enable the extension
1919

2020
```lisp
21-
(query "CREATE EXTENSION IF NOT EXISTS vector")
21+
(load-extension "vector")
2222
```
2323

2424
Create a table
@@ -36,8 +36,6 @@ Insert a vector
3636
Get the nearest neighbors
3737

3838
```lisp
39-
(register-sql-operators :2+-ary :<-> :<#> :<=>)
40-
4139
(doquery (:limit (:order-by (:select 'id 'embedding :from 'items) (:<-> 'embedding "[1,1,1]")) 5) (id embedding)
4240
(format t "~A: ~A~%" id embedding))
4341
```

postmodern.lisp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
(connect-toplevel "pgvector_lisp_test" (uiop:getenv "USER") "" "localhost")
55

6-
(query "CREATE EXTENSION IF NOT EXISTS vector")
6+
(load-extension "vector")
77

88
(query (:drop-table :if-exists 'items))
99

@@ -12,8 +12,6 @@
1212
(query (:insert-into 'items :set 'embedding "[1,1,1]"))
1313
(query (:insert-rows-into 'items :columns 'embedding :values '(("[2,2,2]") ("[1,1,2]"))))
1414

15-
(register-sql-operators :2+-ary :<-> :<#> :<=>)
16-
1715
(doquery (:limit (:order-by (:select 'id 'embedding :from 'items) (:<-> 'embedding "[1,1,1]")) 5) (id embedding)
1816
(format t "~A: ~A~%" id embedding))
1917

0 commit comments

Comments
 (0)