Skip to content

Commit 6bc61ab

Browse files
authored
docs: clarify type requirement for vectors for Postgres and Qdrant. (#789)
1 parent 9491acf commit 6bc61ab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/docs/ops/targets.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ Here's how CocoIndex data elements map to Postgres elements during export:
3232
For example, if you have a data collector that collects rows with fields `id`, `title`, and `embedding`, it will be exported to a Postgres table with corresponding columns.
3333
It should be a unique table, meaning that no other export target should export to the same table.
3434

35+
:::warning vector type mapping to Postgres
36+
37+
Since vectors in pgvector must have fixed dimension, we only map vectors of number types with fixed dimension (i.e. *Vector[cocoindex.Float32, N]*, *Vector[cocoindex.Float64, N]*, and *Vector[cocoindex.Int64, N]*) to `vector(N)` columns.
38+
For all other vector types, we map them to `jsonb` columns.
39+
40+
:::
41+
3542
#### Spec
3643

3744
The spec takes the following fields:
@@ -58,6 +65,13 @@ Here's how CocoIndex data elements map to Qdrant elements during export:
5865

5966
*Vector[Float32, N]*, *Vector[Float64, N]* and *Vector[Int64, N]* types fit into Qdrant vector.
6067

68+
:::warning vector type mapping to Qdrant
69+
70+
Since vectors in Qdrant must have fixed dimension, we only map vectors of number types with fixed dimension (i.e. *Vector[cocoindex.Float32, N]*, *Vector[cocoindex.Float64, N]*, and *Vector[cocoindex.Int64, N]*) to Qdrant vectors.
71+
For all other vector types, we map to Qdrant payload as JSON arrays.
72+
73+
:::
74+
6175
#### Spec
6276

6377
The spec takes the following fields:

0 commit comments

Comments
 (0)