File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Add an approximate index
4545``` lisp
4646(query (:create-index 'my-index :on 'items :using hnsw :fields "embedding vector_l2_ops"))
4747;; or
48- (query "CREATE INDEX ON items USING ivfflat ( embedding vector_l2_ops) WITH (lists = 100)" )
48+ (query (:create-index 'my-index :on ' items :using ivfflat :fields " embedding vector_l2_ops" :with (:= 'lists 100)) )
4949```
5050
5151Use ` vector_ip_ops ` for inner product and ` vector_cosine_ops ` for cosine distance
Original file line number Diff line number Diff line change 1515(doquery (:limit (:order-by (:select ' id ' embedding :from ' items) (:<-> ' embedding " [1,1,1]" )) 5 ) (id embedding)
1616 (format t " ~A : ~A~% " id embedding))
1717
18- (query (:create-index ' my-index :on ' items :using hnsw :fields " embedding vector_l2_ops" ))
18+ (query (:create-index ' my-hnsw-index :on ' items :using hnsw :fields " embedding vector_l2_ops" ))
19+ ; ; or
20+ (query (:create-index ' my-ivfflat-index :on ' items :using ivfflat :fields " embedding vector_l2_ops" :with (:= ' lists 1 )))
You can’t perform that action at this time.
0 commit comments