mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-07 13:10:56 +08:00
Added intvec type
This commit is contained in:
22
README.md
22
README.md
@@ -934,6 +934,28 @@ Function | Description | Added
|
||||
avg(halfvec) → halfvec | average | 0.7.0
|
||||
sum(halfvec) → halfvec | sum | 0.7.0
|
||||
|
||||
### Intvec Type
|
||||
|
||||
Each int vector takes `dimensions + 8` bytes of storage. Each element is a single byte signed integer. Int vectors can have up to 16,000 dimensions.
|
||||
|
||||
### Intvec Operators
|
||||
|
||||
Operator | Description | Added
|
||||
--- | --- | ---
|
||||
<-> | Euclidean distance | 0.8.0
|
||||
<#> | negative inner product | 0.8.0
|
||||
<=> | cosine distance | 0.8.0
|
||||
<+> | taxicab distance | 0.7.0
|
||||
|
||||
### Intvec Functions
|
||||
|
||||
Function | Description | Added
|
||||
--- | --- | ---
|
||||
cosine_distance(intvec, intvec) → double precision | cosine distance | 0.8.0
|
||||
inner_product(intvec, intvec) → double precision | inner product | 0.8.0
|
||||
l2_distance(intvec, intvec) → double precision | Euclidean distance | 0.8.0
|
||||
l1_distance(intvec, intvec) → double precision | taxicab distance | 0.8.0
|
||||
|
||||
### Bit Type
|
||||
|
||||
Each bit vector takes `dimensions / 8 + 8` bytes of storage. See the [Postgres docs](https://www.postgresql.org/docs/current/datatype-bit.html) for more info.
|
||||
|
||||
Reference in New Issue
Block a user