@@ -26,7 +26,7 @@ pip install -e .[test,dev]
2626- ` paradedb.sqlalchemy.search ` : ParadeDB predicates (` match_all ` , ` fuzzy ` , ` parse ` , ` more_like_this ` , etc.).
2727- ` paradedb.sqlalchemy.pdb ` : function wrappers (` score ` , ` snippet ` , ` snippets ` , ` agg ` ).
2828- ` paradedb.sqlalchemy.facets ` : aggregate/facet JSON builders and rows+facets helper.
29- - ` paradedb.sqlalchemy.select_with ` : select decorators for score/snippet/snippet_positions columns.
29+ - ` paradedb.sqlalchemy.select_with ` : select decorators for score/snippet/snippets/ snippet_positions columns.
3030- ` paradedb.sqlalchemy.alembic ` : Alembic operations for BM25 index lifecycle.
3131
3232## Quickstart
@@ -58,18 +58,20 @@ products_bm25_idx = Index(
5858 " products_bm25_idx" ,
5959 indexing.BM25Field(Product.id),
6060 indexing.BM25Field(
61- expr.json_text(Product.metadata , " color" ),
61+ expr.json_text(Product.metadata_ , " color" ),
6262 tokenizer = indexing.tokenize.literal(alias = " metadata_color" ),
6363 ),
6464 indexing.BM25Field(
65- expr.json_text(Product.metadata , " location" ),
65+ expr.json_text(Product.metadata_ , " location" ),
6666 tokenizer = indexing.tokenize.literal(alias = " metadata_location" ),
6767 ),
6868 postgresql_using = " bm25" ,
6969 postgresql_with = {" key_field" : " id" },
7070)
7171```
7272
73+ Use ` metadata_ ` as the ORM attribute name if your underlying column is named ` metadata ` .
74+
7375Tokenizer configs can use a Django/Rails-style structured shape:
7476
7577``` python
@@ -107,7 +109,7 @@ products_bm25_idx = Index(
107109
108110- Basic predicates: ` match_all ` , ` match_any ` , ` term ` , ` phrase ` , ` fuzzy ` , ` regex ` , ` all `
109111- Advanced predicates: ` parse ` , ` phrase_prefix ` , ` regex_phrase ` , ` near ` , ` proximity ` , ` more_like_this `
110- - Scoring/snippets: ` pdb.score ` , ` pdb.snippet ` , ` pdb.snippets ` , ` pdb.snippet_positions ` , ` select_with.score ` , ` select_with.snippet ` , ` select_with.snippet_positions `
112+ - Scoring/snippets: ` pdb.score ` , ` pdb.snippet ` , ` pdb.snippets ` , ` pdb.snippet_positions ` , ` select_with.score ` , ` select_with.snippet ` , ` select_with.snippets ` , ` select_with. snippet_positions`
111113- Aggregations/facets: ` facets.* ` builders + ` pdb.agg(...) `
112114- Rows + facets: ` facets.with_rows(...) `
113115
0 commit comments