todo: mark OR support done; note grouping/in:/relative-dates remaining

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 23:19:38 +00:00
co-authored by Claude Opus 4.8
parent 03f7bb81cf
commit 8faa4abcaf
+6 -3
View File
@@ -33,9 +33,12 @@ Deferred work. Context: Officer is collapsing from multi-tenant / open-source-re
`WHERE` on `emails`; quoted values → exact phrases; free text → prefix-AND full-text; unknown `WHERE` on `emails`; quoted values → exact phrases; free text → prefix-AND full-text; unknown
`op:val` falls back to free text. Structured-filters-only queries skip the FTS join. Validated `op:val` falls back to free text. Structured-filters-only queries skip the FTS join. Validated
on the real 18k-mail DB. Search box placeholder hints at operators. on the real 18k-mail DB. Search box placeholder hints at operators.
- [ ] **Remaining:** `OR` and parenthesised grouping (currently everything is ANDed). Would need a - [x] **`OR`** (done 2026-07-24, `85d38fb`). Query splits on top-level uppercase `OR` into branches;
real boolean parser instead of the flat tokenizer. Also consider `in:sent/inbox/spam/trash` each branch is a self-contained condition (`id IN (FTS subquery)` + its SQL filters) and
(folder scope) and relative dates (`newer_than:7d`). branches are OR'd — so OR works across full-text *and* structured filters. Verified on the 18k
DB (`from:github OR from:deepgram` = 90+7 = 97 exactly).
- [ ] **Remaining:** parenthesised grouping (nesting `(a OR b) c`), `in:sent/inbox/spam/trash`
(folder scope), and relative dates (`newer_than:7d`). Grouping needs a recursive parser.
## Known bugs ## Known bugs