feat: native vector search support - #130
Open
rebasedming wants to merge 2 commits into
Open
Conversation
rebasedming
requested review from
isaacvando,
mdashti,
philippemnoel and
stuhood
as code owners
July 25, 2026 17:37
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## paradedb-am #130 +/- ##
===============================================
+ Coverage 90.43% 90.83% +0.40%
===============================================
Files 20 21 +1
Lines 2425 2542 +117
Branches 779 811 +32
===============================================
+ Hits 2193 2309 +116
- Misses 232 233 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| puts "Hybrid Search with Reciprocal Rank Fusion (single SQL query)" | ||
| puts "=" * 80 | ||
| puts "\nCombining ParadeDB DSL + Neighbor DSL in one CTE-based query" | ||
| puts "\nCombining ParadeDB BM25 + native vector distance in one CTE-based query" |
Member
There was a problem hiding this comment.
Suggested change
| puts "\nCombining ParadeDB BM25 + native vector distance in one CTE-based query" | |
| puts "\nCombining ParadeDB BM25 + vector distance in one CTE-based query" |
Wdyt?
| - [Autocomplete](examples/autocomplete/autocomplete.rb) | ||
| - [More Like This](examples/more_like_this/more_like_this.rb) | ||
| - [Hybrid Search (RRF)](examples/hybrid_rrf/hybrid_rrf.rb) | ||
| - [Vector Search](examples/vector_search/vector_search.rb) |
Member
There was a problem hiding this comment.
perhaps vector search should be higher? Like right below Quickstart maybe, on all ORMs?
|
|
||
| ## Vector Search | ||
|
|
||
| rails-paradedb natively supports pgvector `vector(n)` columns — no `neighbor` or other pgvector gem required. Declare the column, list it in the BM25 index with a distance metric, and run Top-K queries: |
Member
There was a problem hiding this comment.
see my comment on EF Core PR
rebasedming
force-pushed
the
vector-search
branch
from
July 27, 2026 15:34
8b2fcd6 to
d47a2ae
Compare
rebasedming
force-pushed
the
vector-search
branch
from
July 27, 2026 16:04
d47a2ae to
8830e40
Compare
rebasedming
force-pushed
the
vector-search
branch
from
July 27, 2026 18:49
8830e40 to
6d7be01
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements paradedb/paradedb#5685: native vector search support with no
neighborgem dependency.vector(n)ActiveModel type witht.vector :embedding, limit: nmigration DSL and schema-dumper round-tripModel.nearest(:embedding, vec).limit(k)— orders by the pgvector operator, defaults the metric from the index opclass, and auto-addskey_field @@@ pdb.all()when the relation has no ParadeDB predicate<->,<=>,<#>)embedding: { metric: :cosine }, emitted as opclasses and round-tripped by the schema dumperneighbor; newvector_searchexample; vector integration tests capability-gated until a release ships vector-in-bm25Why
ParadeDB indexes pgvector columns inside the bm25 index, so users should get the full query surface from this gem alone.
Tests
Rails 8.1 and 7.2: 387 unit / 289 integration examples, 0 failures (2 pending vs 0.24.2 via capability gate; 0 pending vs a dev pg_search 0.25.0 where EXPLAIN confirms Top-K pushdown). rubocop/api-coverage/gem-install smoke all clean.