Skip to content

Vector Search (pgvector)

Microbase enables the PostgreSQL pgvector extension lazily as soon as you add a vector field to any collection.

Terminal window
curl -X POST http://localhost:3000/api/collections/documents/vector-search \
-H "Content-Type: application/json" \
-d '{
"field": "embedding",
"vector": [0.012, -0.045, 0.089],
"limit": 10,
"metric": "cosine"
}'
  • Respects the collection’s list_rule automatically.
  • Supports cosine (<=>), l2 (<->), and inner_product (<#>) distance metrics.
  • Can be combined with filter to narrow results before or alongside vector ranking.