mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-02 18:50:56 +08:00
Updated readme [skip ci]
This commit is contained in:
@@ -78,12 +78,18 @@ 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
|
||||
Average vectors
|
||||
|
||||
```sql
|
||||
SELECT AVG(embedding) FROM items;
|
||||
```
|
||||
|
||||
Average groups of vectors
|
||||
|
||||
```sql
|
||||
SELECT category_id, AVG(embedding) FROM items GROUP BY category_id;
|
||||
```
|
||||
|
||||
## Indexing
|
||||
|
||||
Speed up queries with an approximate index. Add an index for each distance function you want to use.
|
||||
|
||||
Reference in New Issue
Block a user