pgvector.git / summary / log / commit / refs

commit    68378066a8236a17a6014264e69fa37c19522b2f
Author:   Andrew Kane <andrew@ankane.org>
Date:     Mon Mar 06 01:54:02 2023 +0000

    Added example of AVG [skip ci]


README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 994d7890..64fc98b8 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,12 @@ SELECT * FROM items WHERE embedding <-> '[3,1,2]' < 5; Note: Combine with `ORDER BY` and `LIMIT` to use an index +Get the average of vectors + +```sql +SELECT AVG(embedding) FROM items; +``` + ## Indexing Speed up queries with an approximate index. Add an index for each distance function you want to use. [parent: 4f8620fe9eaa]