Skip to content

Commit bf96840

Browse files
ollywhenomis
andauthored
Fix the vector embedding for Pgvector (#219)
Fixed the order of filter and ordering parameters Co-authored-by: Oliver Wickham <owickham@supervised.com> Co-authored-by: Simone Vellei <henomis@gmail.com>
1 parent a428b30 commit bf96840

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index/vectordb/postgres/postgres.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ func (d *DB) similaritySearch(
157157
"SELECT id, embedding, metadata, %s AS score FROM %s %s ORDER BY %s LIMIT %d",
158158
queryVector,
159159
d.table,
160-
queryVector,
161160
opts.Filter,
161+
queryVector,
162162
opts.TopK,
163163
)
164164

0 commit comments

Comments
 (0)