Commit 2e569f1
fix(objectql): normalize OData $search/$searchFields so the search executor runs (ADR-0061)
Follow-up to the $search executor (#2134): over the REST/OData path the term
never reached engine.find(). protocol.findData() normalizes $-prefixed OData
params ($top/$skip/$orderby/$select/$count) to bare names, but NOT $search /
$searchFields — so `$search=retail` fell through to the implicit-field-filter
pass and became `where.$search = 'retail'` (a non-existent column), which the
driver silently returns [] for. The engine's expandSearchToFilter (which reads
ast.search) therefore never fired.
- Add ['$search','search'] and ['$searchFields','searchFields'] to the
dollar→bare normalization, and add 'searchFields' to knownParams so the bare
form isn't treated as an implicit filter.
- Test: findData normalizes $search/$searchFields to bare and never leaks them
into where.
Verified end-to-end over the real HTTP API against a dev backend: searching
"retail" returns the 3 retail-industry accounts (matched by the industry
label→value), "technology" → 4, "Contoso" → 1 by name, "zzqq" → 0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent d0fa753 commit 2e569f1
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2021 | 2021 | | |
2022 | 2022 | | |
2023 | 2023 | | |
| 2024 | + | |
| 2025 | + | |
2024 | 2026 | | |
2025 | 2027 | | |
2026 | 2028 | | |
| |||
2133 | 2135 | | |
2134 | 2136 | | |
2135 | 2137 | | |
2136 | | - | |
| 2138 | + | |
2137 | 2139 | | |
2138 | 2140 | | |
2139 | 2141 | | |
| |||
0 commit comments