Summary
The contains text search filter returns no results while equals works correctly (see screenshot). After a thorough code audit, 7 related filter issues were identified across the objectui and spec repos.
Root Cause Analysis
Bug 1 (Critical): contains filter returns empty results — Server-side double-conversion
- Frontend sends AST:
['name', 'contains', 'Evan']
- Server
parseFilterAST() converts to { name: { $contains: 'Evan' } }
- Driver receives
{ name: { $contains: 'Evan' } } but does not translate $contains → database-native (SQL/Mongo regex)
- Results are always empty.
Other issues:
notContains operator missing from mapping tables
isEmpty/isNotEmpty only matches null, not empty strings
between filter renders only one input, needs min/max
- Case sensitivity inconsistency (
contains)
in/notIn operator expanded in frontend; drivers support natively
- Same double-conversion bug for
startsWith/endsWith
Proposed Fixes
- Remove or refactor
parseFilterAST() call and let drivers process raw AST arrays
- Ensure drivers (esp. Memory & SQL) correctly convert
$contains, $startsWith, $endsWith, $notContains to native DB queries
- Update frontend FilterBuilder for correct input rendering & operator mapping
Reproduction
- ListView/Contact, filter Name with Contains, value = 'Evan'
- No items found; Equals with exact value works
Affected Files
- objectui and spec repos, details in full analysis
Cross-Repo Impact
Requires coordinated changes in both objectui and spec repositories (especially data engine drivers).
Summary
The
containstext search filter returns no results whileequalsworks correctly (see screenshot). After a thorough code audit, 7 related filter issues were identified across theobjectuiandspecrepos.Root Cause Analysis
Bug 1 (Critical):
containsfilter returns empty results — Server-side double-conversion['name', 'contains', 'Evan']parseFilterAST()converts to{ name: { $contains: 'Evan' } }{ name: { $contains: 'Evan' } }but does not translate$contains→ database-native (SQL/Mongo regex)Other issues:
notContainsoperator missing from mapping tablesisEmpty/isNotEmptyonly matches null, not empty stringsbetweenfilter renders only one input, needs min/maxcontains)in/notInoperator expanded in frontend; drivers support nativelystartsWith/endsWithProposed Fixes
parseFilterAST()call and let drivers process raw AST arrays$contains,$startsWith,$endsWith,$notContainsto native DB queriesReproduction
Affected Files
Cross-Repo Impact
Requires coordinated changes in both objectui and spec repositories (especially data engine drivers).