You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This object form of a field node isn't wired up for top-level `fields` projection. When the
object's schema is registered, the engine's unknown-field filter compares each entry against
the schema's field names via `String(f)`, so an object entry never matches and is silently
dropped from the projection — the aliased field is simply missing from results, no error. Use
`expand` to pull in a relationship's fields instead.
Expand (Related Records)
Load related records through lookup / master_detail fields with expand.
Each key is a relationship field name; the value is a nested query that can
select fields, filter, and expand further (default max depth: 3).
The engine resolves expand via batch $in queries (driver-agnostic), so it
works on every driver. Per-parent limit / offset / orderBy are not
applied on this path.
`count_distinct` / `array_agg` / `string_agg` are only fully supported on the MongoDB driver.
The SQL driver's aggregate function mapper throws `Unsupported aggregate function` for all
three (only `count`/`sum`/`avg`/`min`/`max` are mapped), and the in-memory driver's aggregator
silently returns `null` for them. Avoid these three on SQL- or memory-backed objects.
`having` is accepted by `QuerySchema` but is not enforced by the query engine today.
`EngineAggregateOptions` (the type `ObjectQL.aggregate()` actually takes) has no `having`
field, and both the REST `findData()` dispatcher and `ObjectQL.aggregate()` build their
driver-facing query from only `where` / `groupBy` / `aggregations` — a `having` clause is
silently dropped before it reaches any driver. No driver (SQL, in-memory, MongoDB) filters
on it either. Post-filter grouped results on the client until this is wired up.
Joins
`joins` is defined in `QuerySchema` (`JoinNodeSchema`) and the SQL driver advertises
`supports.joins: true`, but no driver's `find()` actually executes a join today — the SQL,
in-memory, and MongoDB drivers all ignore the `joins` array (there is no `.join()`/`.leftJoin()`
call in the SQL driver's query builder). Use `expand` for relationship traversal instead.
Fields to search (optional — defaults to all searchable)
fuzzy
boolean
Enable fuzzy matching for typo tolerance
operator
'and' | 'or'
How to combine search terms
boost
Record<string, number>
Field relevance weights
minScore
number
Minimum relevance score (0–1)
language
string
Language for stemming/stopwords
highlight
boolean
Return highlighted matches
Only `query` and `fields` are implemented. The engine expands `search` into a driver-agnostic
`$and`-of-`$or`-of-`$contains` filter (ADR-0061) — `fuzzy`, `operator`, `boost`, `minScore`,
`language`, and `highlight` are accepted by `QuerySchema` but read nowhere in
`expandSearchToFilter()` / `normalizeSearch()`, so they have no effect. Multiple search terms
are always AND-ed regardless of `operator`.
Pinyin recall (Chinese deployments)
When pinyin search is enabled (OS_SEARCH_PINYIN_ENABLED — auto-on when the stack's
i18n config lists any zh-* locale, see
Environment Variables → Search), records
with CJK names are also found by typing their full pinyin or initials: searching
zhangwei or zw matches a record named 张伟, alongside the normal CJK and latin
matching. This is transparent to queries and clients — the platform maintains a hidden
__search companion column derived from each object's display/name field and ORs it into
the expanded filter; fields semantics, searchableFields, and drivers are unchanged
(ADR-0097). Relevance ranking and typo tolerance remain Tier-2 (native FTS) and are not
part of this.
Window Functions
`windowFunctions` is only reachable by calling the SQL driver's `findWithWindowFunctions()`
method directly. `ObjectQL.find()` / `.aggregate()` and the `POST /api/v1/data/:object/query`
route never call it, so sending `windowFunctions` through the standard client/REST query path
has no effect.
The top-level `distinct: true` flag is defined in `QuerySchema` but isn't applied by any
driver's `find()` (SQL, in-memory, and MongoDB all ignore it). A separate
`driver.distinct(object, field)` method exists on the SQL and in-memory drivers, but it isn't
called by `ObjectQL.find()`/`.aggregate()`, so it isn't reachable through a normal query.
As noted under [Aggregations](#aggregations) above, `having` is not currently enforced —
it's dropped before reaching the aggregation engine or any driver.