Skip to content

Commit 1f84e20

Browse files
committed
feat!: rename bm25 APIs to paradedb and always use the paradedb access method (paradedb/paradedb#5706)
1 parent 94ce5fc commit 1f84e20

22 files changed

Lines changed: 524 additions & 475 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format
44

55
## Unreleased
66

7+
### Changed
8+
9+
- **Breaking:** the bm25-named API has been renamed to paradedb, and indexes always use the `paradedb` index access method (requires pg_search 0.25.0+). `BM25Field` is now `ParadeDBField`, `validate_bm25_index` is now `validate_paradedb_index`, the Alembic operations `op.create_bm25_index`/`op.drop_bm25_index`/`op.reindex_bm25` are now `op.create_paradedb_index`/`op.drop_paradedb_index`/`op.reindex_paradedb` (with operation classes `CreateParadeDBIndexOp`/`DropParadeDBIndexOp`/`ReindexParadeDBOp`), and the errors `BM25ValidationError`/`InvalidBM25FieldError` are now `ParadeDBValidationError`/`InvalidParadeDBFieldError`. `Index(postgresql_using="paradedb")` is the only recognized access method; index DDL always emits `USING paradedb`. Existing migrations that call the bm25-named operations must be updated to the paradedb names.
10+
711
## [0.8.0] - 2026-07-14
812

913
### Changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636

3737
## ParadeDB for SQLAlchemy
3838

39-
The official [SQLAlchemy](https://www.sqlalchemy.org/) integration for [ParadeDB](https://paradedb.com) (powered by the [`pg_search`](https://github.com/paradedb/paradedb) Postgres extension), including first-class support for managing BM25 indexes with Alembic and running queries using the full ParadeDB API. Follow the [getting started guide](https://docs.paradedb.com/documentation/getting-started/environment#sqlalchemy) to begin.
39+
The official [SQLAlchemy](https://www.sqlalchemy.org/) integration for [ParadeDB](https://paradedb.com) (powered by the [`pg_search`](https://github.com/paradedb/paradedb) Postgres extension), including first-class support for managing ParadeDB indexes with Alembic and running queries using the full ParadeDB API. Follow the [getting started guide](https://docs.paradedb.com/documentation/getting-started/environment#sqlalchemy) to begin.
4040

4141
## Requirements & Compatibility
4242

4343
| Component | Supported |
4444
| ---------- | ----------------------------- |
4545
| Python | 3.10+ |
4646
| SQLAlchemy | 2.0.32+ |
47-
| ParadeDB | 0.22.0+ |
47+
| ParadeDB | 0.25.0+ |
4848
| PostgreSQL | 15+ (with ParadeDB extension) |
4949

5050
## Examples

examples/autocomplete/setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ class Product(Base):
3434

3535
Index(
3636
"products_autocomplete_bm25_idx",
37-
indexing.BM25Field(Product.id),
38-
indexing.BM25Field(Product.description),
39-
indexing.BM25Field(
37+
indexing.ParadeDBField(Product.id),
38+
indexing.ParadeDBField(Product.description),
39+
indexing.ParadeDBField(
4040
Product.description,
4141
tokenizer=tokenizer.ngram(3, 8, options={"prefix_only": True, "alias": "description_ngram"}),
4242
),
43-
indexing.BM25Field(Product.category, tokenizer=tokenizer.literal()),
44-
indexing.BM25Field(Product.rating),
45-
postgresql_using="bm25",
43+
indexing.ParadeDBField(Product.category, tokenizer=tokenizer.literal()),
44+
indexing.ParadeDBField(Product.rating),
45+
postgresql_using="paradedb",
4646
postgresql_with={"key_field": "id"},
4747
)
4848

examples/faceted_search/setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class Product(Base):
3434

3535
Index(
3636
"products_facets_bm25_idx",
37-
indexing.BM25Field(Product.id),
38-
indexing.BM25Field(Product.description),
39-
indexing.BM25Field(Product.category, tokenizer=tokenizer.literal()),
40-
indexing.BM25Field(Product.rating),
41-
postgresql_using="bm25",
37+
indexing.ParadeDBField(Product.id),
38+
indexing.ParadeDBField(Product.description),
39+
indexing.ParadeDBField(Product.category, tokenizer=tokenizer.literal()),
40+
indexing.ParadeDBField(Product.rating),
41+
postgresql_using="paradedb",
4242
postgresql_with={"key_field": "id"},
4343
)
4444

examples/hybrid_rrf/setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class Product(Base):
3434

3535
Index(
3636
"products_hybrid_rrf_bm25_idx",
37-
indexing.BM25Field(Product.id),
38-
indexing.BM25Field(Product.description),
39-
indexing.BM25Field(Product.category, tokenizer=tokenizer.literal()),
40-
indexing.BM25Field(Product.rating),
41-
postgresql_using="bm25",
37+
indexing.ParadeDBField(Product.id),
38+
indexing.ParadeDBField(Product.description),
39+
indexing.ParadeDBField(Product.category, tokenizer=tokenizer.literal()),
40+
indexing.ParadeDBField(Product.rating),
41+
postgresql_using="paradedb",
4242
postgresql_with={"key_field": "id"},
4343
)
4444

examples/more_like_this/setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class Product(Base):
3434

3535
Index(
3636
"products_mlt_bm25_idx",
37-
indexing.BM25Field(Product.id),
38-
indexing.BM25Field(Product.description),
39-
indexing.BM25Field(Product.category, tokenizer=tokenizer.literal()),
40-
indexing.BM25Field(Product.rating),
41-
postgresql_using="bm25",
37+
indexing.ParadeDBField(Product.id),
38+
indexing.ParadeDBField(Product.description),
39+
indexing.ParadeDBField(Product.category, tokenizer=tokenizer.literal()),
40+
indexing.ParadeDBField(Product.rating),
41+
postgresql_using="paradedb",
4242
postgresql_with={"key_field": "id"},
4343
)
4444

examples/quickstart/setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class Product(Base):
3434

3535
Index(
3636
"products_bm25_idx",
37-
indexing.BM25Field(Product.id),
38-
indexing.BM25Field(Product.description),
39-
indexing.BM25Field(Product.category, tokenizer=tokenizer.literal()),
40-
indexing.BM25Field(Product.rating),
41-
postgresql_using="bm25",
37+
indexing.ParadeDBField(Product.id),
38+
indexing.ParadeDBField(Product.description),
39+
indexing.ParadeDBField(Product.category, tokenizer=tokenizer.literal()),
40+
indexing.ParadeDBField(Product.rating),
41+
postgresql_using="paradedb",
4242
postgresql_with={"key_field": "id"},
4343
)
4444

examples/rag/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class Document(Base):
2929

3030
Index(
3131
"documents_bm25_idx",
32-
indexing.BM25Field(Document.id),
33-
indexing.BM25Field(Document.content),
34-
postgresql_using="bm25",
32+
indexing.ParadeDBField(Document.id),
33+
indexing.ParadeDBField(Document.content),
34+
postgresql_using="paradedb",
3535
postgresql_with={"key_field": "id"},
3636
)
3737

paradedb/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
paradedb_verify_index,
77
)
88
from .sqlalchemy.facets import with_rows
9-
from .sqlalchemy.indexing import BM25Field, assert_indexed, describe
9+
from .sqlalchemy.indexing import ParadeDBField, assert_indexed, describe
1010
from .sqlalchemy.tokenizer import Tokenizer
1111
from .sqlalchemy import tokenizer
1212
from .sqlalchemy.pdb import agg, alias, score, snippet, snippet_positions, snippets
@@ -31,7 +31,7 @@
3131
)
3232

3333
__all__ = [
34-
"BM25Field",
34+
"ParadeDBField",
3535
"ProximityExpr",
3636
"Tokenizer",
3737
"agg",

0 commit comments

Comments
 (0)