v0.1.83 — 2 Jul 2026
Feature — JSONB/JSON column search and flexible primary key support
Who is affected: Anyone using ?search= on a collection that has json or jsonb columns (for example the built-in daas_permissions collection, or any custom collection with a json field). Also affects integrators whose collections use a primary key column other than id.
What’s new
Coarse json/jsonb search
?search= now matches content inside json and jsonb columns, not just string/text fields. When a collection has at least one json/jsonb column, the search is routed through a dedicated Postgres RPC (daas_search_item_ids) that performs server-side col::text ILIKE %q% matching and returns matching primary keys. The main query then filters to those keys, so permissions, additional filters, sort, pagination, and meta.total all continue to work correctly.
Before this change, searching a collection with jsonb columns returned HTTP 500 because PostgREST’s filter parser rejects column casts inside or() expressions.
Non-id primary key support
Collections whose primary key column is not named id now work correctly across all REST API CRUD operations (create, read, update, delete, list). The service resolves the real PK column from the schema on startup and caches it per collection. Platform Studio (Content pages) still assumed id in this release — fixed in v0.1.84.
Behaviour details
| Scenario | Before | After |
|---|---|---|
?search= on a collection with jsonb columns | ❌ HTTP 500 (failed to parse logic tree) | ✅ 200 — matches text and jsonb content |
?search= on a text-only collection | ✅ Fast PostgREST path | ✅ Unchanged (zero impact) |
CRUD on a collection with a non-id primary key | ❌ column <table>.id does not exist | ✅ Correct PK used throughout |
Jsonb search is coarse — it matches the serialised text of the entire column (keys and values). A search for name will match any row that contains a name key, not only rows where name equals a specific value. For precise querying, store values in typed columns.
By default, jsonb search returns at most 150 matching rows per request to stay within URL length limits. Override this with the JSONB_SEARCH_MATCH_LIMIT environment variable.