Skip to content

feat: native vector search support - #146

Open
rebasedming wants to merge 2 commits into
paradedb-amfrom
vector-search
Open

feat: native vector search support#146
rebasedming wants to merge 2 commits into
paradedb-amfrom
vector-search

Conversation

@rebasedming

Copy link
Copy Markdown
Contributor

What

Implements paradedb/paradedb#5685: native vector search support with no pgvector-python dependency.

  • VectorField(dimensions=n) model field for pgvector vector(n) with migration serialization
  • L2Distance / CosineDistance / InnerProduct expressions (<->, <=>, <#>) for .order_by()/.annotate()
  • Per-field metric option on BM25Index emitting vector opclasses (vector_l2_ops etc.)
  • Migrated hybrid_rrf example off pgvector-python; new vector_search example; integration tests capability-gated until a release ships vector-in-bm25

The distance operators are intentionally not in api.json5 — they are pgvector operators, not pg_search schema symbols, and schema-compat validates against released schemas.

Why

ParadeDB indexes pgvector columns inside the bm25 index, so users should get the full query surface from this package alone.

Tests

Full suite passes against 0.24.2 (302 passed; 3 vector integration tests skip via capability gate). ruff/mypy/schema-compat/api-coverage all clean.

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.68421% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.60%. Comparing base (98230af) to head (0907deb).

Files with missing lines Patch % Lines
paradedb/vector.py 98.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           paradedb-am     #146      +/-   ##
===============================================
+ Coverage        87.96%   88.60%   +0.64%     
===============================================
  Files                9       10       +1     
  Lines             1188     1264      +76     
  Branches           249      260      +11     
===============================================
+ Hits              1045     1120      +75     
  Misses              85       85              
- Partials            58       59       +1     
Flag Coverage Δ
dj4.2 88.60% <98.68%> (+0.64%) ⬆️
dj5.2 88.60% <98.68%> (+0.64%) ⬆️
dj6.0 88.60% <98.68%> (+0.64%) ⬆️
django-paradedb 88.60% <98.68%> (+0.64%) ⬆️
pg15 88.60% <98.68%> (+0.64%) ⬆️
pg16 88.60% <98.68%> (+0.64%) ⬆️
pg17 88.60% <98.68%> (+0.64%) ⬆️
pg18 88.60% <98.68%> (+0.64%) ⬆️
py3.10 88.60% <98.68%> (+0.64%) ⬆️
py3.11 88.60% <98.68%> (+0.64%) ⬆️
py3.12 88.60% <98.68%> (+0.64%) ⬆️
py3.13 88.60% <98.68%> (+0.64%) ⬆️
py3.14 88.60% <98.68%> (+0.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
paradedb/indexes.py 85.02% <100.00%> (+0.75%) ⬆️
paradedb/vector.py 98.50% <98.50%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread tests/test_vector.py Outdated

The SQL-generation tests are unit tests that don't require a database.
Integration tests are gated on bm25 vector opclass support, which is not
yet in a released pg_search (it lives on branch ``mvp/vector-search``).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stale?

Comment thread README.md Outdated

## Vector Search

ParadeDB indexes pgvector `vector` columns inside its BM25 index and serves Top-K nearest-neighbor queries. django-paradedb ships native support — no pgvector Python package needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comment on EF Core PR

@rebasedming
rebasedming changed the base branch from main to paradedb-am July 27, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants